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