2022-01-05 22:11:37 +00:00
|
|
|
error[E0277]: `NotSend` cannot be sent between threads safely
|
2023-05-07 18:38:52 +00:00
|
|
|
--> $DIR/partial-drop-partial-reinit.rs:6:16
|
2022-01-05 22:11:37 +00:00
|
|
|
|
|
|
|
|
LL | gimme_send(foo());
|
|
|
|
| ---------- ^^^^^ `NotSend` cannot be sent between threads safely
|
|
|
|
| |
|
|
|
|
| required by a bound introduced by this call
|
|
|
|
...
|
|
|
|
LL | async fn foo() {
|
2023-10-02 21:31:46 +00:00
|
|
|
| -------------- within this `impl Future<Output = ()>`
|
2022-01-05 22:11:37 +00:00
|
|
|
|
|
2024-01-29 18:31:02 +00:00
|
|
|
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `NotSend`, which is required by `impl Future<Output = ()>: Send`
|
2022-01-05 22:11:37 +00:00
|
|
|
= note: required because it appears within the type `(NotSend,)`
|
2023-10-25 16:26:36 +00:00
|
|
|
note: required because it's used within this `async` fn body
|
2024-03-19 15:37:28 +00:00
|
|
|
--> $DIR/partial-drop-partial-reinit.rs:27:16
|
2022-06-19 18:59:36 +00:00
|
|
|
|
|
|
|
|
LL | async fn foo() {
|
|
|
|
| ________________^
|
|
|
|
LL | |
|
|
|
|
LL | |
|
|
|
|
LL | | let mut x = (NotSend {},);
|
|
|
|
... |
|
|
|
|
LL | | bar().await;
|
|
|
|
LL | | }
|
|
|
|
| |_^
|
2022-01-05 22:11:37 +00:00
|
|
|
note: required by a bound in `gimme_send`
|
2024-03-19 15:37:28 +00:00
|
|
|
--> $DIR/partial-drop-partial-reinit.rs:13:18
|
2022-01-05 22:11:37 +00:00
|
|
|
|
|
|
|
|
LL | fn gimme_send<T: Send>(t: T) {
|
|
|
|
| ^^^^ required by this bound in `gimme_send`
|
|
|
|
|
2023-11-21 15:44:16 +00:00
|
|
|
error: aborting due to 1 previous error
|
2022-01-05 22:11:37 +00:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|