diff --git a/src/test/ui/nll/issue-47388.rs b/src/test/ui/nll/issue-47388.rs index 65748eca2a0cd..39feea08aa489 100644 --- a/src/test/ui/nll/issue-47388.rs +++ b/src/test/ui/nll/issue-47388.rs @@ -15,6 +15,6 @@ struct FancyNum { fn main() { let mut fancy = FancyNum{ num: 5 }; let fancy_ref = &(&mut fancy); - fancy_ref.num = 6; //~^ ERROR E0594 + fancy_ref.num = 6; //~ ERROR E0594 println!("{}", fancy_ref.num); } diff --git a/src/test/ui/nll/issue-47388.stderr b/src/test/ui/nll/issue-47388.stderr index 3b620eaca4bc2..ae6d8d7a59814 100644 --- a/src/test/ui/nll/issue-47388.stderr +++ b/src/test/ui/nll/issue-47388.stderr @@ -3,7 +3,7 @@ error[E0594]: cannot assign through `&`-reference `fancy_ref` | LL | let fancy_ref = &(&mut fancy); | ------------- help: consider changing this to be a mutable reference: `&mut` -LL | fancy_ref.num = 6; //~^ ERROR E0594 +LL | fancy_ref.num = 6; //~ ERROR E0594 | ^^^^^^^^^^^^^^^^^ cannot assign through `&`-reference error: aborting due to previous error