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