File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
test-project/tests/compile-fail Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -17,14 +17,14 @@ impl S {
17
17
}
18
18
19
19
fn func ( arg : S ) {
20
- //~^ HELP make this binding mutable
21
- arg. mutate ( ) ; //~ ERROR cannot borrow immutable argument
22
- //~| NOTE cannot borrow mutably
20
+ //~^ HELP consider changing this to be mutable
21
+ arg. mutate ( ) ; //~ ERROR cannot borrow `arg` as mutable
22
+ //~| NOTE cannot borrow as mutable
23
23
}
24
24
25
25
fn main ( ) {
26
26
let local = S ;
27
- //~^ HELP make this binding mutable
28
- local. mutate ( ) ; //~ ERROR cannot borrow immutable local variable
29
- //~| NOTE cannot borrow mutably
27
+ //~^ HELP consider changing this to be mutable
28
+ local. mutate ( ) ; //~ ERROR cannot borrow ` local` as mutable
29
+ //~| NOTE cannot borrow as mutable
30
30
}
You can’t perform that action at this time.
0 commit comments