]> git.proxmox.com Git - rustc.git/blob - src/test/ui/traits/inherent-method-order.rs
New upstream version 1.52.0~beta.3+dfsg1
[rustc.git] / src / test / ui / traits / inherent-method-order.rs
1 // run-pass
2
3 struct Foo;
4
5 impl Foo {
6 #[allow(dead_code)]
7 fn foo(self) {
8 panic!("wrong method!")
9 }
10 }
11
12 trait Trait {
13 fn foo(self);
14 }
15
16 impl<'a,'b,'c> Trait for &'a &'b &'c Foo {
17 fn foo(self) {
18 // ok
19 }
20 }
21
22 fn main() {
23 let x = &(&(&Foo));
24 x.foo();
25 }