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