]> git.lizzy.rs Git - rust.git/blob - tests/ui/generator/issue-57478.rs
Rollup merge of #106701 - ibraheemdev:sync-sender-spin, r=Amanieu
[rust.git] / tests / ui / generator / issue-57478.rs
1 // check-pass
2 // compile-flags: -Zdrop-tracking
3
4 #![feature(negative_impls, generators)]
5
6 struct Foo;
7 impl !Send for Foo {}
8
9 fn main() {
10     assert_send(|| {
11         let guard = Foo;
12         drop(guard);
13         yield;
14     })
15 }
16
17 fn assert_send<T: Send>(_: T) {}