mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 23:12:02 +00:00
Add a regression test for #89935
This commit is contained in:
parent
e2453dc2ff
commit
101a81b807
18
src/test/ui/typeck/issue-89935.rs
Normal file
18
src/test/ui/typeck/issue-89935.rs
Normal 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() {}
|
Loading…
Reference in New Issue
Block a user