Skip to content

Commit 323df7b

Browse files
committed
Bless tests and update ERROR
1 parent 7a70140 commit 323df7b

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/test/ui/nll/issue-51244.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@
1212

1313
fn main() {
1414
let ref my_ref @ _ = 0;
15-
*my_ref = 0; //~ ERROR cannot assign to data in a `&` reference [E0594]
15+
*my_ref = 0;
16+
//~^ ERROR cannot assign to `*my_ref` which is behind a `&` reference [E0594]
1617
}

src/test/ui/nll/issue-51244.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
error[E0594]: cannot assign to data in a `&` reference
1+
error[E0594]: cannot assign to `*my_ref` which is behind a `&` reference
22
--> $DIR/issue-51244.rs:15:5
33
|
44
LL | let ref my_ref @ _ = 0;
5-
| -------------- help: consider changing this to be a mutable reference: `&mut ef my_ref @ _`
6-
LL | *my_ref = 0; //~ ERROR cannot assign to data in a `&` reference [E0594]
7-
| ^^^^^^^^^^^
5+
| -------------- help: consider changing this to be a mutable reference: `ref mut my_ref @ _`
6+
LL | *my_ref = 0;
7+
| ^^^^^^^^^^^ `my_ref` is a `&` reference, so the data it refers to cannot be written
88

99
error: aborting due to previous error
1010

0 commit comments

Comments
 (0)