rust/tests/ui/coroutine/issue-57478.rs
2023-10-20 21:14:02 +00:00

17 lines
228 B
Rust

// check-pass
#![feature(negative_impls, coroutines)]
struct Foo;
impl !Send for Foo {}
fn main() {
assert_send(|| {
let guard = Foo;
drop(guard);
yield;
})
}
fn assert_send<T: Send>(_: T) {}