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/coroutine-with-nll.rs:8:17
|
2018-01-11 18:50:40 +00:00
|
|
|
|
|
2024-07-22 01:37:22 +00:00
|
|
|
LL | || {
|
|
|
|
| -- within this coroutine
|
|
|
|
...
|
2018-07-26 11:17:33 +00:00
|
|
|
LL | let b = &mut true;
|
2018-01-29 07:29:58 +00:00
|
|
|
| ^^^^^^^^^
|
2019-03-09 12:03:44 +00:00
|
|
|
LL |
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | yield ();
|
2018-01-29 07:29:58 +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 || {
|
|
|
|
| ++++++
|
2018-01-29 07:29:58 +00:00
|
|
|
|
2023-11-21 15:44:16 +00:00
|
|
|
error: aborting due to 1 previous error
|
2018-01-11 18:50:40 +00:00
|
|
|
|
2018-03-03 14:59:40 +00:00
|
|
|
For more information about this error, try `rustc --explain E0626`.
|