rust/foo.rs
Niko Matsakis 60f5cad6eb try to fix issue 57017, but not quite there yet
Co-authored-by: Eric Holk <eric@theincredibleholk.org>
2022-03-07 09:43:25 -08:00

22 lines
400 B
Rust

// check-pass
#![feature(generators, negative_impls)]
struct Client;
impl !Sync for Client {}
fn status(_client_status: &Client) -> i16 {
200
}
fn assert_send<T: Send>(_thing: T) {}
// This is the same bug as issue 57017, but using yield instead of await
fn main() {
let client = Client;
let g = move || match status(&client) {
_status => yield,
};
assert_send(g);
}