fork/rust

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

borsAuto merge of #71868 - Mark-Simulacrum:stable-1.43.1, r=pietroalbini8d69840ab92

1.43.1
768 B21 linesraw
1error[E0594]: cannot assign to `*foo` which is behind a `&` reference
2  --> $DIR/issue-51515.rs:5:5
3   |
4LL |     let foo = &16;
5   |               --- help: consider changing this to be a mutable reference: `&mut 16`
6...
7LL |     *foo = 32;
8   |     ^^^^^^^^^ `foo` is a `&` reference, so the data it refers to cannot be written
9
10error[E0594]: cannot assign to `*bar` which is behind a `&` reference
11  --> $DIR/issue-51515.rs:10:5
12   |
13LL |     let bar = foo;
14   |         --- help: consider changing this to be a mutable reference: `&mut i32`
15...
16LL |     *bar = 64;
17   |     ^^^^^^^^^ `bar` is a `&` reference, so the data it refers to cannot be written
18
19error: aborting due to 2 previous errors
20
21For more information about this error, try `rustc --explain E0594`.