fork/rust

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

borsAuto merge of #67350 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum73528e339aa

1.40.0
700 B20 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