diff options
Diffstat (limited to '')
-rw-r--r-- | tests/ui/nll/issue-57989.stderr (renamed from src/test/ui/nll/issue-57989.stderr) | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/test/ui/nll/issue-57989.stderr b/tests/ui/nll/issue-57989.stderr index e85e63e52..31f40d825 100644 --- a/src/test/ui/nll/issue-57989.stderr +++ b/tests/ui/nll/issue-57989.stderr @@ -1,11 +1,13 @@ error[E0594]: cannot assign to `*x`, which is behind a `&` reference --> $DIR/issue-57989.rs:5:5 | -LL | fn f(x: &i32) { - | ---- help: consider changing this to be a mutable reference: `&mut i32` -LL | let g = &x; LL | *x = 0; | ^^^^^^ `x` is a `&` reference, so the data it refers to cannot be written + | +help: consider changing this to be a mutable reference + | +LL | fn f(x: &mut i32) { + | ~~~~~~~~ error[E0506]: cannot assign to `*x` because it is borrowed --> $DIR/issue-57989.rs:5:5 |