rust/tests/ui/coroutine/static-not-unpin.rs
Esteban Küber 7e0d3ed951 fix tests
Paths in CI can be longer than in devs' machines.
2024-11-02 16:58:50 +00:00

21 lines
511 B
Rust

//@ revisions: current next
//@ ignore-compare-mode-next-solver (explicit revisions)
//@[next] compile-flags: -Znext-solver --diagnostic-width=300
//@[current] compile-flags: --diagnostic-width=300
#![feature(coroutines, stmt_expr_attributes)]
//@ normalize-stderr-test: "std::pin::Unpin" -> "std::marker::Unpin"
use std::marker::Unpin;
fn assert_unpin<T: Unpin>(_: T) {}
fn main() {
let mut coroutine = #[coroutine]
static || {
yield;
};
assert_unpin(coroutine); //~ ERROR E0277
}