2018-11-06 12:47:18 -06:00
|
|
|
//@ run-pass
|
|
|
|
|
2024-04-11 08:15:34 -05:00
|
|
|
#![feature(coroutines, coroutine_trait, stmt_expr_attributes)]
|
2018-11-06 12:47:18 -06:00
|
|
|
|
2023-10-19 11:06:43 -05:00
|
|
|
use std::ops::Coroutine;
|
2018-11-06 12:47:18 -06:00
|
|
|
|
2023-10-19 16:46:28 -05:00
|
|
|
fn assert_coroutine<G: Coroutine>(_: G) {
|
2018-11-06 12:47:18 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2024-04-11 08:15:34 -05:00
|
|
|
assert_coroutine(#[coroutine] static || yield);
|
|
|
|
assert_coroutine(Box::pin(#[coroutine] static || yield));
|
2018-11-06 12:47:18 -06:00
|
|
|
}
|