fix ui test
This commit is contained in:
parent
6686d104c8
commit
e18a83be88
2 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue