mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-30 03:57:37 +00:00
12 lines
257 B
Rust
12 lines
257 B
Rust
// Ensure that we don't suggest constraining `CallRefFuture` here,
|
|
// since that isn't stable.
|
|
|
|
fn spawn<F: AsyncFn() + Send>(f: F) {
|
|
check_send(f());
|
|
//~^ ERROR cannot be sent between threads safely
|
|
}
|
|
|
|
fn check_send<T: Send>(_: T) {}
|
|
|
|
fn main() {}
|