Skip to content

Commit d5347ff

Browse files
committed
Fix ui test
1 parent 20151ca commit d5347ff

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

src/test/ui/issue-13033.stderr

+4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ LL | fn bar(&mut self, other: &Foo) {}
99
|
1010
= note: expected type `fn(&mut Baz, &mut dyn Foo)`
1111
found type `fn(&mut Baz, &dyn Foo)`
12+
help: consider change the type to match the mutability in trait
13+
|
14+
LL | fn bar(&mut self, other: &mut Foo) {}
15+
| ^^^^^^^^
1216

1317
error: aborting due to previous error
1418

src/test/ui/mismatched_types/E0053.stderr

+4
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ LL | fn bar(&mut self) { }
2121
|
2222
= note: expected type `fn(&Bar)`
2323
found type `fn(&mut Bar)`
24+
help: consider change the type to match the mutability in trait
25+
|
26+
LL | fn bar(&self) { }
27+
| ^^^^^
2428

2529
error: aborting due to 2 previous errors
2630

src/test/ui/mismatched_types/trait-impl-fn-incompatibility.stderr

+4
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ LL | fn bar(&mut self, bar: &Bar) { } //~ ERROR incompatible type
2121
|
2222
= note: expected type `fn(&mut Bar, &mut Bar)`
2323
found type `fn(&mut Bar, &Bar)`
24+
help: consider change the type to match the mutability in trait
25+
|
26+
LL | fn bar(&mut self, bar: &mut Bar) { } //~ ERROR incompatible type
27+
| ^^^^^^^^
2428

2529
error: aborting due to 2 previous errors
2630

0 commit comments

Comments
 (0)