Skip to content

Commit 101a81b

Browse files
committed
Add a regression test for rust-lang#89935
1 parent e2453dc commit 101a81b

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/test/ui/typeck/issue-89935.rs

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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() {}

0 commit comments

Comments
 (0)