2023-04-11 21:15:39 +00:00
|
|
|
//@ revisions: current next
|
2024-03-11 01:18:41 +00:00
|
|
|
//@ ignore-compare-mode-next-solver (explicit revisions)
|
2023-12-14 12:11:28 +00:00
|
|
|
//@[next] compile-flags: -Znext-solver
|
2023-04-11 21:15:39 +00:00
|
|
|
|
2024-04-11 13:15:34 +00:00
|
|
|
#![feature(coroutines, stmt_expr_attributes)]
|
2018-11-04 21:07:55 +00:00
|
|
|
|
2024-06-21 05:15:36 +00:00
|
|
|
//@ normalize-stderr-test: "std::pin::Unpin" -> "std::marker::Unpin"
|
2018-11-07 18:01:35 +00:00
|
|
|
|
2018-11-04 21:07:55 +00:00
|
|
|
use std::marker::Unpin;
|
|
|
|
|
2024-04-11 13:15:34 +00:00
|
|
|
fn assert_unpin<T: Unpin>(_: T) {}
|
2018-11-04 21:07:55 +00:00
|
|
|
|
|
|
|
fn main() {
|
2024-04-11 13:15:34 +00:00
|
|
|
let mut coroutine = #[coroutine]
|
|
|
|
static || {
|
2018-11-04 21:07:55 +00:00
|
|
|
yield;
|
|
|
|
};
|
2023-10-19 21:46:28 +00:00
|
|
|
assert_unpin(coroutine); //~ ERROR E0277
|
2018-11-04 21:07:55 +00:00
|
|
|
}
|