2024-05-01 16:03:26 -04:00
|
|
|
error: future cannot be sent between threads safely
|
2023-03-29 22:18:20 +02:00
|
|
|
--> $DIR/auto-with-drop_tracking_mir.rs:25:13
|
2023-03-30 03:51:27 +00:00
|
|
|
|
|
|
|
|
|
LL | is_send(foo());
|
2024-05-01 16:03:26 -04:00
|
|
|
| ^^^^^ future returned by `foo` is not `Send`
|
2023-03-30 03:51:27 +00:00
|
|
|
|
|
2024-10-24 21:14:17 +00:00
|
|
|
= help: the trait `Sync` is not implemented for `NotSync`
|
2024-05-01 16:03:26 -04:00
|
|
|
note: future is not `Send` as this value is used across an await
|
|
|
|
|
--> $DIR/auto-with-drop_tracking_mir.rs:16:11
|
|
|
|
|
|
|
|
|
|
|
LL | let x = &NotSync;
|
|
|
|
|
| - has type `&NotSync` which is not `Send`
|
|
|
|
|
LL | bar().await;
|
|
|
|
|
| ^^^^^ await occurs here, with `x` maybe used later
|
2023-03-30 03:51:27 +00:00
|
|
|
note: required by a bound in `is_send`
|
2023-03-29 22:18:20 +02:00
|
|
|
--> $DIR/auto-with-drop_tracking_mir.rs:24:24
|
2023-03-30 03:51:27 +00:00
|
|
|
|
|
|
|
|
|
LL | fn is_send(_: impl Send) {}
|
|
|
|
|
| ^^^^ required by this bound in `is_send`
|
|
|
|
|
|
2023-11-21 15:44:16 +00:00
|
|
|
error: aborting due to 1 previous error
|
2023-03-30 03:51:27 +00:00
|
|
|
|