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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
321 B
Rust
Raw Normal View History

trait Foo {
2019-05-28 13:46:13 -05:00
fn bar(&mut self, other: &mut dyn Foo);
}
struct Baz;
impl Foo for Baz {
2019-05-28 13:46:13 -05:00
fn bar(&mut self, other: &dyn Foo) {}
//~^ ERROR method `bar` has an incompatible type for trait
//~| expected fn pointer `fn(&mut Baz, &mut dyn Foo)`
//~| found fn pointer `fn(&mut Baz, &dyn Foo)`
}
fn main() {}