rust/src/test/ui/suggestions/issue-51515.stderr

18 lines
653 B
Plaintext
Raw Normal View History

2018-07-09 15:16:02 -05:00
error[E0594]: cannot assign to `*foo` which is behind a `&` reference
--> $DIR/issue-51515.rs:15:5
|
LL | let foo = &16;
| --- help: consider changing this to be a mutable reference: `&mut 16`
LL | *foo = 32;
| ^^^^^^^^^ `foo` is a `&` reference, so the data it refers to cannot be written
error[E0594]: cannot assign to `*bar` which is behind a `&` reference
--> $DIR/issue-51515.rs:17:5
|
LL | *bar = 64;
| ^^^^^^^^^ `bar` is a `&` reference, so the data it refers to cannot be written
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0594`.