error[E0597]: `b` does not live long enough
  --> $DIR/ref-escapes-but-not-over-yield.rs:11:13
   |
LL |       let mut b = move || {
   |  _________________-
LL | |         yield();
LL | |         let b = 5;
LL | |         a = &b;
   | |             ^^ borrowed value does not live long enough
LL | |
LL | |     };
   | |     -
   | |     |
   | |     `b` dropped here while still borrowed
   | |_____... and the borrow might be used here, when that temporary is dropped and runs the destructor for generator
   |       a temporary with access to the borrow is created here ...

error: aborting due to previous error

For more information about this error, try `rustc --explain E0597`.