]> git.lizzy.rs Git - rust.git/blob - tests/ui/issues/issue-10456.rs
Rollup merge of #106867 - sunfishcode:sunfishcode/std-os-fd-stable-version, r=m-ou-se
[rust.git] / tests / ui / issues / issue-10456.rs
1 // check-pass
2 // pretty-expanded FIXME #23616
3
4 pub struct Foo;
5
6 pub trait Bar {
7     fn bar(&self);
8 }
9
10 pub trait Baz {
11     fn baz(&self) { }
12 }
13
14 impl<T: Baz> Bar for T {
15     fn bar(&self) {}
16 }
17
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
23 }
24
25 fn main() {}