mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-08 09:38:26 +03:00
Error on using yield without also using #[coroutine] on the closure
And suggest adding the `#[coroutine]` to the closure
This commit is contained in:
@@ -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;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user