]> git.lizzy.rs Git - rust.git/blob - src/test/ui/typeck/issue-89935.rs
Merge commit '0cb0f7636851f9fcc57085cf80197a2ef6db098f' into clippyup
[rust.git] / src / test / ui / typeck / issue-89935.rs
1 // check-pass
2
3 trait Foo: Baz {}
4 trait Bar {}
5 trait Baz: Bar {
6     fn bar(&self);
7 }
8
9 impl<T: Foo> Bar for T {}
10 impl<T: Foo> Baz for T {
11     fn bar(&self) {}
12 }
13
14 fn accept_foo(x: Box<dyn Foo>) {
15     x.bar();
16 }
17
18 fn main() {}