mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-24 12:54:00 +00:00
14 lines
288 B
Rust
14 lines
288 B
Rust
//@ aux-build:foreign-async-fn.rs
|
|
//@ edition:2021
|
|
|
|
extern crate foreign_async_fn;
|
|
use foreign_async_fn::Foo;
|
|
|
|
fn bar<T: Foo>() {
|
|
fn needs_send(_: impl Send) {}
|
|
needs_send(T::test());
|
|
//~^ ERROR `impl Future<Output = ()>` cannot be sent between threads safely
|
|
}
|
|
|
|
fn main() {}
|