2022-10-01 05:19:31 -05:00
|
|
|
error: future cannot be sent between threads safely
|
2023-06-24 05:02:54 -05:00
|
|
|
--> $DIR/issue-64130-2-send.rs:22:13
|
2022-10-01 05:19:31 -05:00
|
|
|
|
|
|
|
|
LL | is_send(bar());
|
|
|
|
| ^^^^^ future returned by `bar` is not `Send`
|
|
|
|
|
|
2024-10-24 16:14:17 -05:00
|
|
|
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Foo`
|
2022-10-01 05:19:31 -05:00
|
|
|
note: future is not `Send` as this value is used across an await
|
2023-05-07 13:38:52 -05:00
|
|
|
--> $DIR/issue-64130-2-send.rs:15:11
|
2022-10-01 05:19:31 -05:00
|
|
|
|
|
2023-05-07 13:38:52 -05:00
|
|
|
LL | let x = Foo;
|
|
|
|
| - has type `Foo` which is not `Send`
|
2022-10-01 05:19:31 -05:00
|
|
|
LL | baz().await;
|
2023-04-25 13:59:16 -05:00
|
|
|
| ^^^^^ await occurs here, with `x` maybe used later
|
2022-10-01 05:19:31 -05:00
|
|
|
note: required by a bound in `is_send`
|
2023-05-07 13:38:52 -05:00
|
|
|
--> $DIR/issue-64130-2-send.rs:11:15
|
2022-10-01 05:19:31 -05:00
|
|
|
|
|
|
|
|
LL | fn is_send<T: Send>(t: T) { }
|
|
|
|
| ^^^^ required by this bound in `is_send`
|
|
|
|
|
2023-11-21 09:44:16 -06:00
|
|
|
error: aborting due to 1 previous error
|
2022-10-01 05:19:31 -05:00
|
|
|
|