summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-51515.stderr
blob: c4e61e719539280b1bc96b9e87fae6ae4c180ffd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
error[E0594]: cannot assign to `*foo`, which is behind a `&` reference
  --> $DIR/issue-51515.rs:5:5
   |
LL |     *foo = 32;
   |     ^^^^^^^^^ `foo` is a `&` reference, so the data it refers to cannot be written
   |
help: consider changing this to be a mutable reference
   |
LL |     let foo = &mut 16;
   |               ~~~~~~~

error[E0594]: cannot assign to `*bar`, which is behind a `&` reference
  --> $DIR/issue-51515.rs:8:5
   |
LL |     let bar = foo;
   |         --- consider changing this binding's type to be: `&mut i32`
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`.