Sign in
fuchsia
/
third_party
/
rust
/
f22bb2e72267890782897c208bbc9114d023dfc7
/
.
/
src
/
test
/
ui
/
error-codes
/
E0389.rs
blob: 9dab2c3092434d6645b3dbfe4d43957379df0c4f [
file
] [
log
] [
blame
]
struct
FancyNum
{
num
:
u8
,
}
fn
main
()
{
let
mut
fancy
=
FancyNum
{
num
:
5
};
let
fancy_ref
=
&(&
mut
fancy
);
fancy_ref
.
num
=
6
;
//~ ERROR cannot assign to `fancy_ref.num` which is behind a `&` reference
println
!(
"{}"
,
fancy_ref
.
num
);
}