Sign in
rust
/
rust-lang
/
rust
/
refs/heads/perf-tmp
/
.
/
tests
/
ui
/
nll
/
coroutine-upvar-mutability.rs
blob: a7d14173fb9fc57eebcbce4a03e9308588718c84 [
file
] [
log
] [
blame
]
// Check that coroutines respect the muatability of their upvars.
#![
feature
(
coroutines
)]
fn
mutate_upvar
()
{
let
x
=
0
;
#[
coroutine
]
move
||
{
x
=
1
;
//~^ ERROR
yield
;
};
}
fn
main
()
{}