Sign in
chromium
/
external
/
github.com
/
rust-lang
/
rust
/
ab1f382ca8fa4a4c0dde58679207f9bec394fa0e
/
.
/
tests
/
ui
/
error-codes
/
E0389.rs
blob: 41172b362f495b296ce790ec1539dd36d63447f8 [
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
);
}