2015-06-24 12:42:05 -05:00
|
|
|
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;
|
2015-08-07 09:58:00 -05:00
|
|
|
//~^ ERROR E0038
|
|
|
|
//~| ERROR E0038
|
2015-06-24 12:42:05 -05:00
|
|
|
}
|