Error on using yield without also using #[coroutine] on the closure
And suggest adding the `#[coroutine]` to the closure
This commit is contained in:
parent
9c0e5f2c34
commit
20e40d5efe
2 changed files with 4 additions and 2 deletions
|
|
@ -1,7 +1,8 @@
|
|||
#![feature(coroutines)]
|
||||
|
||||
unsafe fn foo() {
|
||||
let mut ga = static || {
|
||||
let mut ga = #[coroutine]
|
||||
static || {
|
||||
yield 1;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
#![feature(coroutines)]
|
||||
|
||||
unsafe fn foo() {
|
||||
let mut ga = static || {
|
||||
let mut ga = #[coroutine]
|
||||
static || {
|
||||
yield 1;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue