Sign in
fuchsia
/
third_party
/
rust
/
0f11354a9c1bf0c5ac250c7fa2bafc289a662f42
/
.
/
src
/
test
/
ui
/
borrowck
/
immutable-arg.rs
blob: 8d1cd3c80455c971f70132196171c0502f9a5c14 [
file
] [
log
] [
blame
]
//compile-flags: -Z borrowck=compare
fn
foo
(
_x
:
u32
)
{
_x
=
4
;
//~^ ERROR cannot assign to immutable argument `_x` (Mir)
//~^^ ERROR cannot assign twice to immutable variable `_x` (Ast)
}
fn
main
()
{}