]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-51515.stderr
Rollup merge of #86165 - m-ou-se:proc-macro-span-shrink, r=dtolnay
[rust.git] / src / test / ui / issues / issue-51515.stderr
1 error[E0594]: cannot assign to `*foo`, which is behind a `&` reference
2   --> $DIR/issue-51515.rs:5:5
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
10 error[E0594]: cannot assign to `*bar`, which is behind a `&` reference
11   --> $DIR/issue-51515.rs:10:5
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
21 For more information about this error, try `rustc --explain E0594`.