2023-10-19 16:46:28 -05:00
|
|
|
error[E0626]: borrow may still be in use when coroutine yields
|
2024-04-11 08:15:34 -05:00
|
|
|
--> $DIR/yield-in-args.rs:9:13
|
2017-07-15 05:52:49 -05:00
|
|
|
|
|
2024-07-21 20:37:22 -05:00
|
|
|
LL | || {
|
|
|
|
| -- within this coroutine
|
|
|
|
LL | let b = true;
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | foo(&b, yield);
|
2019-04-22 02:40:08 -05:00
|
|
|
| ^^ ----- possible yield occurs here
|
2024-07-21 20:37:22 -05:00
|
|
|
|
|
|
|
|
help: add `static` to mark this coroutine as unmovable
|
|
|
|
|
|
|
|
|
LL | static || {
|
|
|
|
| ++++++
|
2017-07-15 05:52:49 -05:00
|
|
|
|
2023-11-21 09:44:16 -06:00
|
|
|
error: aborting due to 1 previous error
|
2017-07-15 05:52:49 -05:00
|
|
|
|
2018-03-03 08:59:40 -06:00
|
|
|
For more information about this error, try `rustc --explain E0626`.
|