1 error[E0501]: cannot borrow `x` as immutable because previous closure requires unique access
2 --> $DIR/yield-while-ref-reborrowed.rs:45:20
5 | -- closure construction occurs here
7 | - previous borrow occurs due to use of `x` in closure
9 45 | println!("{}", x); //~ ERROR
10 | ^ borrow occurs here
13 | - borrow from closure ends here
15 error: aborting due to previous error