1
1
error: future cannot be sent between threads safely
2
- --> $DIR/issue-65436-raw-ptr-not-send.rs:12 :17
2
+ --> $DIR/issue-65436-raw-ptr-not-send.rs:16 :17
3
3
|
4
4
LL | assert_send(async {
5
5
| _________________^
@@ -10,24 +10,24 @@ LL | | })
10
10
|
11
11
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `*const u8`
12
12
note: future is not `Send` as this value is used across an await
13
- --> $DIR/issue-65436-raw-ptr-not-send.rs:14 :35
13
+ --> $DIR/issue-65436-raw-ptr-not-send.rs:18 :35
14
14
|
15
15
LL | bar(Foo(std::ptr::null())).await;
16
16
| ---------------- ^^^^^^ await occurs here, with `std::ptr::null()` maybe used later
17
17
| |
18
18
| has type `*const u8` which is not `Send`
19
19
note: `std::ptr::null()` is later dropped here
20
- --> $DIR/issue-65436-raw-ptr-not-send.rs:14 :41
20
+ --> $DIR/issue-65436-raw-ptr-not-send.rs:18 :41
21
21
|
22
22
LL | bar(Foo(std::ptr::null())).await;
23
23
| ^
24
24
help: consider moving this into a `let` binding to create a shorter lived borrow
25
- --> $DIR/issue-65436-raw-ptr-not-send.rs:14 :13
25
+ --> $DIR/issue-65436-raw-ptr-not-send.rs:18 :13
26
26
|
27
27
LL | bar(Foo(std::ptr::null())).await;
28
28
| ^^^^^^^^^^^^^^^^^^^^^
29
29
note: required by a bound in `assert_send`
30
- --> $DIR/issue-65436-raw-ptr-not-send.rs:9 :19
30
+ --> $DIR/issue-65436-raw-ptr-not-send.rs:13 :19
31
31
|
32
32
LL | fn assert_send<T: Send>(_: T) {}
33
33
| ^^^^ required by this bound in `assert_send`
0 commit comments