Sign in
android
/
toolchain
/
rustc
/
951ae7a5eefab93734d1309f0497487f13f59fbf
/
.
/
tests
/
ui
/
nll
/
generator-upvar-mutability.rs
blob: c49ea15b824832641dac75411d92c69b882b0d6d [
file
] [
log
] [
blame
]
// Check that generators respect the muatability of their upvars.
#![
feature
(
generators
)]
fn
mutate_upvar
()
{
let
x
=
0
;
move
||
{
x
=
1
;
//~^ ERROR
yield
;
};
}
fn
main
()
{}