fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #69854 - pietroalbini:stable-next, r=Centrilb8cedc00407

1.42.0
725 B19 linesraw
1error[E0053]: method `bar` has an incompatible type for trait
2  --> $DIR/issue-13033.rs:8:30
3   |
4LL |     fn bar(&mut self, other: &mut dyn Foo);
5   |                              ------------ type in trait
6...
7LL |     fn bar(&mut self, other: &dyn Foo) {}
8   |                              ^^^^^^^^ types differ in mutability
9   |
10   = note: expected fn pointer `fn(&mut Baz, &mut dyn Foo)`
11              found fn pointer `fn(&mut Baz, &dyn Foo)`
12help: consider change the type to match the mutability in trait
13   |
14LL |     fn bar(&mut self, other: &mut dyn Foo) {}
15   |                              ^^^^^^^^^^^^
16
17error: aborting due to previous error
18
19For more information about this error, try `rustc --explain E0053`.