]> git.lizzy.rs Git - rust.git/blob - tests/ui/generator/drop-yield-twice.rs
Rollup merge of #106664 - chenyukang:yukang/fix-106597-remove-lseek, r=cuviper
[rust.git] / tests / ui / generator / drop-yield-twice.rs
1 #![feature(negative_impls, generators)]
2
3 struct Foo(i32);
4 impl !Send for Foo {}
5
6 fn main() {
7     assert_send(|| { //~ ERROR generator cannot be sent between threads safely
8         let guard = Foo(42);
9         yield;
10         drop(guard);
11         yield;
12     })
13 }
14
15 fn assert_send<T: Send>(_: T) {}