2024-10-09 23:31:01 +02:00
|
|
|
// issue: rust-lang/rust#19538
|
|
|
|
|
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 14:46:13 -04:00
|
|
|
let test: &mut dyn Bar = &mut thing;
|
2015-08-07 10:58:00 -04:00
|
|
|
//~^ ERROR E0038
|
|
|
|
//~| ERROR E0038
|
2015-06-24 12:42:05 -05:00
|
|
|
}
|