]>
Commit | Line | Data |
---|---|---|
60c5eb7d | 1 | // check-pass |
c34b1796 AL |
2 | // pretty-expanded FIXME #23616 |
3 | ||
e9174d1e | 4 | trait Foo: Sized { |
1a4d82fc JJ |
5 | fn bar(&self); |
6 | fn baz(&self) { } | |
7 | fn bah(_: Option<Self>) { } | |
8 | } | |
9 | ||
10 | struct BarTy { | |
c34b1796 | 11 | x : isize, |
1a4d82fc JJ |
12 | y : f64, |
13 | } | |
14 | ||
15 | impl BarTy { | |
16 | fn a() {} | |
17 | fn b(&self) {} | |
18 | } | |
19 | ||
20 | // If these fail, it's necessary to update rustc_resolve and the cfail tests. | |
21 | impl Foo for *const BarTy { | |
22 | fn bar(&self) { | |
23 | self.baz(); | |
24 | BarTy::a(); | |
25 | Foo::bah(None::<*const BarTy>); | |
26 | } | |
27 | } | |
28 | ||
29 | // If these fail, it's necessary to update rustc_resolve and the cfail tests. | |
30 | impl<'a> Foo for &'a BarTy { | |
31 | fn bar(&self) { | |
32 | self.baz(); | |
33 | self.x; | |
34 | self.y; | |
35 | BarTy::a(); | |
36 | Foo::bah(None::<&BarTy>); | |
37 | self.b(); | |
38 | } | |
39 | } | |
40 | ||
41 | // If these fail, it's necessary to update rustc_resolve and the cfail tests. | |
42 | impl<'a> Foo for &'a mut BarTy { | |
43 | fn bar(&self) { | |
44 | self.baz(); | |
45 | self.x; | |
46 | self.y; | |
47 | BarTy::a(); | |
48 | Foo::bah(None::<&mut BarTy>); | |
49 | self.b(); | |
50 | } | |
51 | } | |
52 | ||
53 | // If these fail, it's necessary to update rustc_resolve and the cfail tests. | |
54 | impl Foo for Box<BarTy> { | |
55 | fn bar(&self) { | |
56 | self.baz(); | |
57 | Foo::bah(None::<Box<BarTy>>); | |
58 | } | |
59 | } | |
60 | ||
61 | // If these fail, it's necessary to update rustc_resolve and the cfail tests. | |
c34b1796 | 62 | impl Foo for *const isize { |
1a4d82fc JJ |
63 | fn bar(&self) { |
64 | self.baz(); | |
c34b1796 | 65 | Foo::bah(None::<*const isize>); |
1a4d82fc JJ |
66 | } |
67 | } | |
68 | ||
69 | // If these fail, it's necessary to update rustc_resolve and the cfail tests. | |
c34b1796 | 70 | impl<'a> Foo for &'a isize { |
1a4d82fc JJ |
71 | fn bar(&self) { |
72 | self.baz(); | |
c34b1796 | 73 | Foo::bah(None::<&isize>); |
1a4d82fc JJ |
74 | } |
75 | } | |
76 | ||
77 | // If these fail, it's necessary to update rustc_resolve and the cfail tests. | |
c34b1796 | 78 | impl<'a> Foo for &'a mut isize { |
1a4d82fc JJ |
79 | fn bar(&self) { |
80 | self.baz(); | |
c34b1796 | 81 | Foo::bah(None::<&mut isize>); |
1a4d82fc JJ |
82 | } |
83 | } | |
84 | ||
85 | // If these fail, it's necessary to update rustc_resolve and the cfail tests. | |
c34b1796 | 86 | impl Foo for Box<isize> { |
1a4d82fc JJ |
87 | fn bar(&self) { |
88 | self.baz(); | |
c34b1796 | 89 | Foo::bah(None::<Box<isize>>); |
1a4d82fc JJ |
90 | } |
91 | } | |
92 | ||
93 | fn main() {} |