Add a regression test for #89935

This commit is contained in:
Yuki Okushi 2021-10-19 02:43:54 +09:00
parent e2453dc2ff
commit 101a81b807
No known key found for this signature in database
GPG Key ID: DABA5B072961C18A

View File

@ -0,0 +1,18 @@
// check-pass
trait Foo: Baz {}
trait Bar {}
trait Baz: Bar {
fn bar(&self);
}
impl<T: Foo> Bar for T {}
impl<T: Foo> Baz for T {
fn bar(&self) {}
}
fn accept_foo(x: Box<dyn Foo>) {
x.bar();
}
fn main() {}