rust/tests/ui/coroutine/static-not-unpin.rs
2023-10-20 21:14:02 +00:00

19 lines
344 B
Rust

// revisions: current next
//[next] compile-flags: -Ztrait-solver=next
#![feature(coroutines)]
// normalize-stderr-test "std::pin::Unpin" -> "std::marker::Unpin"
use std::marker::Unpin;
fn assert_unpin<T: Unpin>(_: T) {
}
fn main() {
let mut coroutine = static || {
yield;
};
assert_unpin(coroutine); //~ ERROR E0277
}