summaryrefslogtreecommitdiffstats
path: root/tests/ui/async-await/in-trait/send-on-foreign-async-fn-in-trait.rs
blob: f0d750714cd0b4a250a431945792fdc448a2a10a (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() {}