rust/tests/ui/generator/static-not-unpin.rs

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

19 lines
344 B
Rust
Raw Normal View History

// revisions: current next
//[next] compile-flags: -Ztrait-solver=next
2018-11-04 15:07:55 -06:00
#![feature(generators)]
// normalize-stderr-test "std::pin::Unpin" -> "std::marker::Unpin"
2018-11-04 15:07:55 -06:00
use std::marker::Unpin;
fn assert_unpin<T: Unpin>(_: T) {
}
fn main() {
let mut generator = static || {
yield;
};
assert_unpin(generator); //~ ERROR E0277
2018-11-04 15:07:55 -06:00
}