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