]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/immut-function-arguments.stderr
reduce spans for `unsafe impl` errors
[rust.git] / src / test / ui / borrowck / immut-function-arguments.stderr
1 error[E0594]: cannot assign to `*y`, as `y` is not declared as mutable
2   --> $DIR/immut-function-arguments.rs:2:5
3    |
4 LL | fn f(y: Box<isize>) {
5    |      - help: consider changing this to be mutable: `mut y`
6 LL |     *y = 5;
7    |     ^^^^^^ cannot assign
8
9 error[E0594]: cannot assign to `*q`, as `q` is not declared as mutable
10   --> $DIR/immut-function-arguments.rs:6:35
11    |
12 LL |     let _frob = |q: Box<isize>| { *q = 2; };
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`.