blob: fe4bc6bce1b31b5a0335c76177ec6011495437bf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
// Check that generators respect the muatability of their upvars.
#![feature(generators, nll)]
fn mutate_upvar() {
let x = 0;
move || {
x = 1;
//~^ ERROR
yield;
};
}
fn main() {}
|