blob: a6da3f7c81c2e1d5942e30d6ed7d129e98817c81 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
//@ 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() {}
|