From 323df7b5049f6026a5bed335e2d7bb1df89b47ef Mon Sep 17 00:00:00 2001 From: ashtneoi Date: Thu, 12 Jul 2018 13:11:47 -0700 Subject: [PATCH] Bless tests and update ERROR --- src/test/ui/nll/issue-51244.rs | 3 ++- 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