fork/rust

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

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

1.39.0
713 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 type `fn(&mut Baz, &mut dyn Foo)`
11              found type `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`.