]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/issues/issue-9394-inherited-trait-calls.rs
3 trait Base
: Base2
+ Base3
{
4 fn foo(&self) -> String
;
5 fn foo1(&self) -> String
;
6 fn foo2(&self) -> String
{
7 "base foo2".to_string()
12 fn baz(&self) -> String
;
16 fn root(&self) -> String
;
20 fn bar(&self) -> String
;
26 fn foo(&self) -> String
{
27 "base foo".to_string()
29 fn foo1(&self) -> String
{
30 "base foo1".to_string()
36 fn baz(&self) -> String
{
37 "base2 baz".to_string()
42 fn root(&self) -> String
{
43 "base3 root".to_string()
48 fn bar(&self) -> String
{
49 "super bar".to_string()
55 let s
= &n
as &dyn Super
;
56 assert_eq
!(s
.bar(),"super bar".to_string());
57 assert_eq
!(s
.foo(),"base foo".to_string());
58 assert_eq
!(s
.foo1(),"base foo1".to_string());
59 assert_eq
!(s
.foo2(),"base foo2".to_string());
60 assert_eq
!(s
.baz(),"base2 baz".to_string());
61 assert_eq
!(s
.root(),"base3 root".to_string());