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 10:52:49 +00:00
|
|
|
|
|
2024-07-22 01:37:22 +00:00
|
|
|
LL | || {
|
|
|
|
| -- within this coroutine
|
|
|
|
LL | let b = true;
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | foo(&b, yield);
|
2019-04-22 07:40:08 +00:00
|
|
|
| ^^ ----- possible yield occurs here
|
2024-07-22 01:37:22 +00:00
|
|
|
|
|
|
|
|
help: add `static` to mark this coroutine as unmovable
|
|
|
|
|
|
|
|
|
LL | static || {
|
|
|
|
| ++++++
|
2017-07-15 10:52:49 +00:00
|
|
|
|
2023-11-21 15:44:16 +00:00
|
|
|
error: aborting due to 1 previous error
|
2017-07-15 10:52:49 +00:00
|
|
|
|
2018-03-03 14:59:40 +00:00
|
|
|
For more information about this error, try `rustc --explain E0626`.
|