]> git.lizzy.rs Git - rust.git/blob - tests/ui/nll/issue-57989.stderr
Fix invalid float literal suggestions when recovering an integer
[rust.git] / tests / ui / nll / issue-57989.stderr
1 error[E0594]: cannot assign to `*x`, which is behind a `&` reference
2   --> $DIR/issue-57989.rs:5:5
3    |
4 LL |     *x = 0;
5    |     ^^^^^^ `x` is a `&` reference, so the data it refers to cannot be written
6    |
7 help: consider changing this to be a mutable reference
8    |
9 LL | fn f(x: &mut i32) {
10    |         ~~~~~~~~
11
12 error[E0506]: cannot assign to `*x` because it is borrowed
13   --> $DIR/issue-57989.rs:5:5
14    |
15 LL |     let g = &x;
16    |             -- borrow of `*x` occurs here
17 LL |     *x = 0;
18    |     ^^^^^^ assignment to borrowed `*x` occurs here
19 LL |
20 LL |     g;
21    |     - borrow later used here
22
23 error: aborting due to 2 previous errors
24
25 Some errors have detailed explanations: E0506, E0594.
26 For more information about an error, try `rustc --explain E0506`.