mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
fix ui test
This commit is contained in:
parent
6686d104c8
commit
e18a83be88
@ -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…
Reference in New Issue
Block a user