fix ui test

This commit is contained in:
gaurikholkar 2018-04-06 23:03:20 +05:30
parent 6686d104c8
commit e18a83be88
2 changed files with 2 additions and 2 deletions

View File

@ -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);
}

View File

@ -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