rust/tests/ui/coroutine/issue-57478.rs

17 lines
228 B
Rust
Raw Normal View History

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