summaryrefslogtreecommitdiffstats
path: root/tests/ui/generator/static-not-unpin.rs
blob: 30d3f29187096bf2538f835e785f2ffb48dce36d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// revisions: current next
//[next] compile-flags: -Ztrait-solver=next

#![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
}