]>
Commit | Line | Data |
---|---|---|
60c5eb7d | 1 | // check-pass |
c34b1796 AL |
2 | // pretty-expanded FIXME #23616 |
3 | ||
1a4d82fc JJ |
4 | pub struct Foo; |
5 | ||
6 | pub trait Bar { | |
7 | fn bar(&self); | |
223e47cc LB |
8 | } |
9 | ||
85aaf69f SL |
10 | pub trait Baz { |
11 | fn baz(&self) { } | |
12 | } | |
1a4d82fc JJ |
13 | |
14 | impl<T: Baz> Bar for T { | |
15 | fn bar(&self) {} | |
223e47cc LB |
16 | } |
17 | ||
1a4d82fc JJ |
18 | impl Baz for Foo {} |
19 | ||
20 | pub fn foo(t: Box<Foo>) { | |
21 | t.bar(); // ~Foo doesn't implement Baz | |
22 | (*t).bar(); // ok b/c Foo implements Baz | |
223e47cc LB |
23 | } |
24 | ||
25 | fn main() {} |