]> git.proxmox.com Git - rustc.git/blame - src/test/ui/issues/issue-51515.stderr
New upstream version 1.36.0+dfsg1
[rustc.git] / src / test / ui / issues / issue-51515.stderr
CommitLineData
8faf50e0 1error[E0594]: cannot assign to `*foo` which is behind a `&` reference
48663c56 2 --> $DIR/issue-51515.rs:5:5
8faf50e0
XL
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
48663c56 11 --> $DIR/issue-51515.rs:10:5
8faf50e0
XL
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