rust/tests/ui/coroutine/issue-57478.rs
2024-02-16 20:02:50 +00:00

17 lines
229 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) {}