2020-01-18 22:59:59 -06:00
|
|
|
error: future cannot be sent between threads safely
|
2023-01-25 21:51:26 -06:00
|
|
|
--> $DIR/issue-65436-raw-ptr-not-send.rs:17:17
|
2020-01-18 22:59:59 -06:00
|
|
|
|
|
2022-08-16 01:27:22 -05:00
|
|
|
LL | assert_send(async {
|
|
|
|
| _________________^
|
|
|
|
LL | |
|
|
|
|
LL | | bar(Foo(std::ptr::null())).await;
|
|
|
|
LL | | })
|
|
|
|
| |_____^ future created by async block is not `Send`
|
2020-01-18 22:59:59 -06:00
|
|
|
|
|
2023-01-25 21:51:26 -06:00
|
|
|
= help: within `[async block@$DIR/issue-65436-raw-ptr-not-send.rs:17:17: 20:6]`, the trait `Send` is not implemented for `*const u8`
|
2020-01-18 22:59:59 -06:00
|
|
|
note: future is not `Send` as this value is used across an await
|
2023-04-25 13:59:16 -05:00
|
|
|
--> $DIR/issue-65436-raw-ptr-not-send.rs:19:36
|
2020-01-18 22:59:59 -06:00
|
|
|
|
|
|
|
|
LL | bar(Foo(std::ptr::null())).await;
|
2023-04-25 13:59:16 -05:00
|
|
|
| ---------------- ^^^^^- `std::ptr::null()` is later dropped here
|
|
|
|
| | |
|
|
|
|
| | await occurs here, with `std::ptr::null()` maybe used later
|
2020-11-02 01:54:53 -06:00
|
|
|
| has type `*const u8` which is not `Send`
|
2020-01-18 22:59:59 -06:00
|
|
|
help: consider moving this into a `let` binding to create a shorter lived borrow
|
2022-10-01 05:19:31 -05:00
|
|
|
--> $DIR/issue-65436-raw-ptr-not-send.rs:19:13
|
2020-01-18 22:59:59 -06:00
|
|
|
|
|
|
|
|
LL | bar(Foo(std::ptr::null())).await;
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
2021-07-31 11:26:55 -05:00
|
|
|
note: required by a bound in `assert_send`
|
2023-01-25 21:51:26 -06:00
|
|
|
--> $DIR/issue-65436-raw-ptr-not-send.rs:14:19
|
2021-07-31 11:26:55 -05:00
|
|
|
|
|
|
|
|
LL | fn assert_send<T: Send>(_: T) {}
|
|
|
|
| ^^^^ required by this bound in `assert_send`
|
2020-01-18 22:59:59 -06:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|