2014-08-17 18:29:10 -05:00
|
|
|
trait Foo {
|
|
|
|
fn bar(&mut self, other: &mut Foo);
|
|
|
|
}
|
|
|
|
|
|
|
|
struct Baz;
|
|
|
|
|
|
|
|
impl Foo for Baz {
|
|
|
|
fn bar(&mut self, other: &Foo) {}
|
2016-07-18 15:13:34 -05:00
|
|
|
//~^ ERROR method `bar` has an incompatible type for trait
|
2018-05-26 22:51:50 -05:00
|
|
|
//~| expected type `fn(&mut Baz, &mut dyn Foo)`
|
|
|
|
//~| found type `fn(&mut Baz, &dyn Foo)`
|
2014-08-17 18:29:10 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|