rust/tests/ui/generator/static-not-unpin.rs
2023-01-11 09:32:08 +00:00

16 lines
272 B
Rust

#![feature(generators)]
// normalize-stderr-test "std::pin::Unpin" -> "std::marker::Unpin"
use std::marker::Unpin;
fn assert_unpin<T: Unpin>(_: T) {
}
fn main() {
let mut generator = static || {
yield;
};
assert_unpin(generator); //~ ERROR E0277
}