]> git.lizzy.rs Git - rust.git/blob - src/test/ui/immut-function-arguments.ast.nll.stderr
Auto merge of #54624 - arielb1:evaluate-outlives, r=nikomatsakis
[rust.git] / src / test / ui / immut-function-arguments.ast.nll.stderr
1 error[E0594]: cannot assign to `*y`, as `y` is not declared as mutable
2   --> $DIR/immut-function-arguments.rs:15:5
3    |
4 LL | fn f(y: Box<isize>) {
5    |      - help: consider changing this to be mutable: `mut y`
6 LL |     *y = 5; //[ast]~ ERROR cannot assign
7    |     ^^^^^^ cannot assign
8
9 error[E0594]: cannot assign to `*q`, as `q` is not declared as mutable
10   --> $DIR/immut-function-arguments.rs:20:35
11    |
12 LL |     let _frob = |q: Box<isize>| { *q = 2; }; //[ast]~ ERROR cannot assign
13    |                  -                ^^^^^^ cannot assign
14    |                  |
15    |                  help: consider changing this to be mutable: `mut q`
16
17 error: aborting due to 2 previous errors
18
19 For more information about this error, try `rustc --explain E0594`.