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