]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generator/drop-yield-twice.rs
Auto merge of #102655 - joboet:windows_tls_opt, r=ChrisDenton
[rust.git] / src / test / 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) {}