diff options
| author | ashtneoi <ashtneoi@gmail.com> | 2018-07-12 13:11:47 -0700 |
|---|---|---|
| committer | ashtneoi <ashtneoi@gmail.com> | 2018-07-12 22:51:30 -0700 |
| commit | 323df7b5049f6026a5bed335e2d7bb1df89b47ef (patch) | |
| tree | 40389baab6504965da7bdb27cbe5c9ed4366ef94 /src | |
| parent | 7a70140ed5a3fb5aa747d219f19f8b1d55812807 (diff) | |
| download | rust-323df7b5049f6026a5bed335e2d7bb1df89b47ef.tar.gz rust-323df7b5049f6026a5bed335e2d7bb1df89b47ef.zip | |
Bless tests and update ERROR
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/ui/nll/issue-51244.rs | 3 | ||||
| -rw-r--r-- | src/test/ui/nll/issue-51244.stderr | 8 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/test/ui/nll/issue-51244.rs b/src/test/ui/nll/issue-51244.rs index 56d9449c467..f00ad3d6505 100644 --- a/src/test/ui/nll/issue-51244.rs +++ b/src/test/ui/nll/issue-51244.rs @@ -12,5 +12,6 @@ fn main() { let ref my_ref @ _ = 0; - *my_ref = 0; //~ ERROR cannot assign to data in a `&` reference [E0594] + *my_ref = 0; + //~^ ERROR cannot assign to `*my_ref` which is behind a `&` reference [E0594] } diff --git a/src/test/ui/nll/issue-51244.stderr b/src/test/ui/nll/issue-51244.stderr index f1f47fc61ce..4e04aec8fe1 100644 --- a/src/test/ui/nll/issue-51244.stderr +++ b/src/test/ui/nll/issue-51244.stderr @@ -1,10 +1,10 @@ -error[E0594]: cannot assign to data in a `&` reference +error[E0594]: cannot assign to `*my_ref` which is behind a `&` reference --> $DIR/issue-51244.rs:15:5 | LL | let ref my_ref @ _ = 0; - | -------------- help: consider changing this to be a mutable reference: `&mut ef my_ref @ _` -LL | *my_ref = 0; //~ ERROR cannot assign to data in a `&` reference [E0594] - | ^^^^^^^^^^^ + | -------------- help: consider changing this to be a mutable reference: `ref mut my_ref @ _` +LL | *my_ref = 0; + | ^^^^^^^^^^^ `my_ref` is a `&` reference, so the data it refers to cannot be written error: aborting due to previous error |
