aef0f4024a
And suggest adding the `#[coroutine]` to the closure
13 lines
236 B
Rust
13 lines
236 B
Rust
//@ compile-flags: --emit metadata
|
|
#![feature(coroutines, coroutine_trait)]
|
|
|
|
use std::marker::Unpin;
|
|
use std::ops::Coroutine;
|
|
|
|
pub fn g() -> impl Coroutine<(), Yield = (), Return = ()> {
|
|
#[coroutine]
|
|
|| {
|
|
yield;
|
|
}
|
|
}
|