rust/tests/ui/coroutine/pin-box-coroutine.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
277 B
Rust
Raw Normal View History

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