2023-05-07 18:38:52 +00:00
|
|
|
//@ check-pass
|
2022-01-21 09:36:24 -08:00
|
|
|
|
2024-04-11 13:15:34 +00:00
|
|
|
#![feature(negative_impls, coroutines, stmt_expr_attributes)]
|
2021-10-08 15:09:20 -07:00
|
|
|
|
|
|
|
struct Foo;
|
|
|
|
impl !Send for Foo {}
|
|
|
|
|
|
|
|
fn main() {
|
2024-04-11 13:15:34 +00:00
|
|
|
assert_send(
|
|
|
|
#[coroutine]
|
|
|
|
|| {
|
|
|
|
let guard = Foo;
|
|
|
|
drop(guard);
|
|
|
|
yield;
|
|
|
|
},
|
|
|
|
)
|
2021-10-08 15:09:20 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
fn assert_send<T: Send>(_: T) {}
|