fork/rust

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

borsAuto merge of #71365 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4fb7144ed15

1.43.0
697 B19 linesraw
1error[E0594]: cannot assign to `*y`, as `y` is not declared as mutable
2  --> $DIR/immut-function-arguments.rs:2:5
3   |
4LL | fn f(y: Box<isize>) {
5   |      - help: consider changing this to be mutable: `mut y`
6LL |     *y = 5;
7   |     ^^^^^^ cannot assign
8
9error[E0594]: cannot assign to `*q`, as `q` is not declared as mutable
10  --> $DIR/immut-function-arguments.rs:6:35
11   |
12LL |     let _frob = |q: Box<isize>| { *q = 2; };
13   |                  -                ^^^^^^ cannot assign
14   |                  |
15   |                  help: consider changing this to be mutable: `mut q`
16
17error: aborting due to 2 previous errors
18
19For more information about this error, try `rustc --explain E0594`.