yield point.
```compile_fail,E0624
+# #![feature(generators)]
let mut b = || {
let a = &3; // <-- This borrow...
yield (); // ...is still in scope here, when the yield occurs.
the integer by value:
```
+# #![feature(generators)]
let mut b = || {
let a = 3;
yield ();
This error also frequently arises with iteration:
```compile_fail,E0624
+# #![feature(generators)]
let mut b = || {
let v = vec![1,2,3];
for &x in &v { // <-- borrow of `v` is still in scope...
`into_iter()`) to avoid borrowing:
```
+# #![feature(generators)]
let mut b = || {
let v = vec![1,2,3];
for x in v { // <-- Take ownership of the values instead!
If taking ownership is not an option, using indices can work too:
```
+# #![feature(generators)]
let mut b = || {
let v = vec![1,2,3];
let len = v.len(); // (*)