mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-24 21:53:56 +00:00
60f5cad6eb
Co-authored-by: Eric Holk <eric@theincredibleholk.org>
22 lines
400 B
Rust
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);
|
|
}
|