1 error: future cannot be sent between threads safely
2 --> $DIR/async-fn-nonsend.rs:49:5
4 LL | fn assert_send(_: impl Send) {}
5 | ----------- ---- required by this bound in `assert_send`
7 LL | assert_send(local_dropped_before_await());
8 | ^^^^^^^^^^^ future returned by `local_dropped_before_await` is not `Send`
10 = help: within `impl std::future::Future`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<()>`
11 note: future is not `Send` as this value is used across an await
12 --> $DIR/async-fn-nonsend.rs:24:5
14 LL | let x = non_send();
15 | - has type `impl std::fmt::Debug`
18 | ^^^^^^^^^^^ await occurs here, with `x` maybe used later
20 | - `x` is later dropped here
22 error: future cannot be sent between threads safely
23 --> $DIR/async-fn-nonsend.rs:51:5
25 LL | fn assert_send(_: impl Send) {}
26 | ----------- ---- required by this bound in `assert_send`
28 LL | assert_send(non_send_temporary_in_match());
29 | ^^^^^^^^^^^ future returned by `non_send_temporary_in_match` is not `Send`
31 = help: within `impl std::future::Future`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<()>`
32 note: future is not `Send` as this value is used across an await
33 --> $DIR/async-fn-nonsend.rs:33:20
35 LL | match Some(non_send()) {
36 | ---------- has type `impl std::fmt::Debug`
37 LL | Some(_) => fut().await,
38 | ^^^^^^^^^^^ await occurs here, with `non_send()` maybe used later
41 | - `non_send()` is later dropped here
43 error: future cannot be sent between threads safely
44 --> $DIR/async-fn-nonsend.rs:53:5
46 LL | fn assert_send(_: impl Send) {}
47 | ----------- ---- required by this bound in `assert_send`
49 LL | assert_send(non_sync_with_method_call());
50 | ^^^^^^^^^^^ future returned by `non_sync_with_method_call` is not `Send`
52 = help: the trait `std::marker::Send` is not implemented for `dyn std::fmt::Write`
53 note: future is not `Send` as this value is used across an await
54 --> $DIR/async-fn-nonsend.rs:42:9
56 LL | let f: &mut std::fmt::Formatter = panic!();
57 | - has type `&mut std::fmt::Formatter<'_>`
58 LL | if non_sync().fmt(f).unwrap() == () {
60 | ^^^^^^^^^^^ await occurs here, with `f` maybe used later
63 | - `f` is later dropped here
65 error: aborting due to 3 previous errors