2019-10-06 22:14:34 +00:00
|
|
|
error: future cannot be sent between threads safely
|
2019-08-02 01:48:43 +00:00
|
|
|
--> $DIR/async-fn-nonsend.rs:50:5
|
2019-06-25 00:48:21 +00:00
|
|
|
|
|
2019-08-24 21:44:43 +00:00
|
|
|
LL | fn assert_send(_: impl Send) {}
|
2019-09-04 17:17:59 +00:00
|
|
|
| ----------- ---- required by this bound in `assert_send`
|
2019-08-24 21:44:43 +00:00
|
|
|
...
|
2019-06-25 00:48:21 +00:00
|
|
|
LL | assert_send(local_dropped_before_await());
|
2019-10-06 22:14:34 +00:00
|
|
|
| ^^^^^^^^^^^ future returned by `local_dropped_before_await` is not `Send`
|
2019-06-25 00:48:21 +00:00
|
|
|
|
|
|
|
|
= help: within `impl std::future::Future`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<()>`
|
2019-10-06 22:14:34 +00:00
|
|
|
note: future is not `Send` as this value is used across an await
|
|
|
|
--> $DIR/async-fn-nonsend.rs:25:5
|
|
|
|
|
|
|
|
|
LL | let x = non_send();
|
|
|
|
| - has type `impl std::fmt::Debug`
|
|
|
|
LL | drop(x);
|
|
|
|
LL | fut().await;
|
|
|
|
| ^^^^^^^^^^^ await occurs here, with `x` maybe used later
|
|
|
|
LL | }
|
|
|
|
| - `x` is later dropped here
|
2019-06-25 00:48:21 +00:00
|
|
|
|
2019-10-06 22:14:34 +00:00
|
|
|
error: future cannot be sent between threads safely
|
2019-08-02 01:48:43 +00:00
|
|
|
--> $DIR/async-fn-nonsend.rs:52:5
|
2019-06-25 00:48:21 +00:00
|
|
|
|
|
2019-08-24 21:44:43 +00:00
|
|
|
LL | fn assert_send(_: impl Send) {}
|
2019-09-04 17:17:59 +00:00
|
|
|
| ----------- ---- required by this bound in `assert_send`
|
2019-08-24 21:44:43 +00:00
|
|
|
...
|
2019-06-25 00:48:21 +00:00
|
|
|
LL | assert_send(non_send_temporary_in_match());
|
2019-10-06 22:14:34 +00:00
|
|
|
| ^^^^^^^^^^^ future returned by `non_send_temporary_in_match` is not `Send`
|
2019-06-25 00:48:21 +00:00
|
|
|
|
|
|
|
|
= help: within `impl std::future::Future`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<()>`
|
2019-10-06 22:14:34 +00:00
|
|
|
note: future is not `Send` as this value is used across an await
|
|
|
|
--> $DIR/async-fn-nonsend.rs:34:20
|
|
|
|
|
|
|
|
|
LL | match Some(non_send()) {
|
|
|
|
| ---------- has type `impl std::fmt::Debug`
|
|
|
|
LL | Some(_) => fut().await,
|
|
|
|
| ^^^^^^^^^^^ await occurs here, with `non_send()` maybe used later
|
|
|
|
...
|
|
|
|
LL | }
|
|
|
|
| - `non_send()` is later dropped here
|
2019-06-25 00:48:21 +00:00
|
|
|
|
2019-10-06 22:14:34 +00:00
|
|
|
error: future cannot be sent between threads safely
|
2019-08-02 01:48:43 +00:00
|
|
|
--> $DIR/async-fn-nonsend.rs:54:5
|
2019-06-25 00:48:21 +00:00
|
|
|
|
|
2019-08-24 21:44:43 +00:00
|
|
|
LL | fn assert_send(_: impl Send) {}
|
2019-09-04 17:17:59 +00:00
|
|
|
| ----------- ---- required by this bound in `assert_send`
|
2019-08-24 21:44:43 +00:00
|
|
|
...
|
2019-06-25 00:48:21 +00:00
|
|
|
LL | assert_send(non_sync_with_method_call());
|
2019-10-06 22:14:34 +00:00
|
|
|
| ^^^^^^^^^^^ future returned by `non_sync_with_method_call` is not `Send`
|
2019-06-25 00:48:21 +00:00
|
|
|
|
|
|
|
|
= help: the trait `std::marker::Send` is not implemented for `dyn std::fmt::Write`
|
2019-10-06 22:14:34 +00:00
|
|
|
note: future is not `Send` as this value is used across an await
|
|
|
|
--> $DIR/async-fn-nonsend.rs:43:9
|
|
|
|
|
|
|
|
|
LL | let f: &mut std::fmt::Formatter = panic!();
|
|
|
|
| - has type `&mut std::fmt::Formatter<'_>`
|
|
|
|
LL | if non_sync().fmt(f).unwrap() == () {
|
|
|
|
LL | fut().await;
|
|
|
|
| ^^^^^^^^^^^ await occurs here, with `f` maybe used later
|
|
|
|
LL | }
|
|
|
|
LL | }
|
|
|
|
| - `f` is later dropped here
|
2019-06-25 00:48:21 +00:00
|
|
|
|
2019-10-06 22:14:34 +00:00
|
|
|
error: future cannot be sent between threads safely
|
2019-08-02 01:48:43 +00:00
|
|
|
--> $DIR/async-fn-nonsend.rs:54:5
|
2019-06-25 00:48:21 +00:00
|
|
|
|
|
2019-08-24 21:44:43 +00:00
|
|
|
LL | fn assert_send(_: impl Send) {}
|
2019-09-04 17:17:59 +00:00
|
|
|
| ----------- ---- required by this bound in `assert_send`
|
2019-08-24 21:44:43 +00:00
|
|
|
...
|
2019-06-25 00:48:21 +00:00
|
|
|
LL | assert_send(non_sync_with_method_call());
|
2019-10-06 22:14:34 +00:00
|
|
|
| ^^^^^^^^^^^ future returned by `non_sync_with_method_call` is not `Send`
|
2019-06-25 00:48:21 +00:00
|
|
|
|
|
|
|
|
= help: within `std::fmt::ArgumentV1<'_>`, the trait `std::marker::Sync` is not implemented for `*mut (dyn std::ops::Fn() + 'static)`
|
2019-10-06 22:14:34 +00:00
|
|
|
note: future is not `Send` as this value is used across an await
|
|
|
|
--> $DIR/async-fn-nonsend.rs:43:9
|
|
|
|
|
|
|
|
|
LL | let f: &mut std::fmt::Formatter = panic!();
|
|
|
|
| - has type `&mut std::fmt::Formatter<'_>`
|
|
|
|
LL | if non_sync().fmt(f).unwrap() == () {
|
|
|
|
LL | fut().await;
|
|
|
|
| ^^^^^^^^^^^ await occurs here, with `f` maybe used later
|
|
|
|
LL | }
|
|
|
|
LL | }
|
|
|
|
| - `f` is later dropped here
|
2019-06-25 00:48:21 +00:00
|
|
|
|
|
|
|
error: aborting due to 4 previous errors
|
|
|
|
|