blob: c49ea15b824832641dac75411d92c69b882b0d6d (
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)]
fn mutate_upvar() {
let x = 0;
move || {
x = 1;
//~^ ERROR
yield;
};
}
fn main() {}
|