rust/src/test/ui/issues/issue-19538.rs

21 lines
289 B
Rust
Raw Normal View History

trait Foo {
fn foo<T>(&self, val: T);
}
trait Bar: Foo { }
pub struct Thing;
impl Foo for Thing {
fn foo<T>(&self, val: T) { }
}
impl Bar for Thing { }
fn main() {
let mut thing = Thing;
2019-05-28 13:46:13 -05:00
let test: &mut dyn Bar = &mut thing;
//~^ ERROR E0038
//~| ERROR E0038
}