2022-01-05 16:11:37 -06:00
|
|
|
error[E0277]: `NotSend` cannot be sent between threads safely
|
2022-09-13 16:41:07 -05:00
|
|
|
--> $DIR/partial-drop-partial-reinit.rs:9:16
|
2022-01-05 16:11:37 -06:00
|
|
|
|
|
|
|
|
LL | gimme_send(foo());
|
|
|
|
| ---------- ^^^^^ `NotSend` cannot be sent between threads safely
|
|
|
|
| |
|
|
|
|
| required by a bound introduced by this call
|
|
|
|
...
|
|
|
|
LL | async fn foo() {
|
|
|
|
| - within this `impl Future<Output = ()>`
|
|
|
|
|
|
|
|
|
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `NotSend`
|
2021-09-14 10:44:08 -05:00
|
|
|
= note: consider using `std::sync::Arc<NotSend>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
|
2022-01-05 16:11:37 -06:00
|
|
|
= note: required because it appears within the type `(NotSend,)`
|
2022-12-19 13:24:59 -06:00
|
|
|
= note: required because it captures the following types: `ResumeTy`, `(NotSend,)`, `()`, `impl Future<Output = ()>`
|
2022-06-21 19:43:46 -05:00
|
|
|
note: required because it's used within this `async fn` body
|
2021-09-14 10:44:08 -05:00
|
|
|
--> $DIR/partial-drop-partial-reinit.rs:32:16
|
2022-06-19 13:59:36 -05:00
|
|
|
|
|
|
|
|
LL | async fn foo() {
|
|
|
|
| ________________^
|
|
|
|
LL | |
|
|
|
|
LL | |
|
|
|
|
LL | | let mut x = (NotSend {},);
|
|
|
|
... |
|
|
|
|
LL | | bar().await;
|
|
|
|
LL | | }
|
|
|
|
| |_^
|
2022-01-05 16:11:37 -06:00
|
|
|
note: required by a bound in `gimme_send`
|
2021-09-14 10:44:08 -05:00
|
|
|
--> $DIR/partial-drop-partial-reinit.rs:18:18
|
2022-01-05 16:11:37 -06:00
|
|
|
|
|
|
|
|
LL | fn gimme_send<T: Send>(t: T) {
|
|
|
|
| ^^^^ required by this bound in `gimme_send`
|
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|