Skip to content

Commit b950ae4

Browse files
committed
Update issue-65436-raw-ptr-not-send.rs
1 parent 911c178 commit b950ae4

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

src/test/ui/async-await/issues/issue-65436-raw-ptr-not-send.stderr renamed to src/test/ui/async-await/issues/issue-65436-raw-ptr-not-send.no_drop_tracking.stderr

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
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
33
|
44
LL | assert_send(async {
55
| _________________^
@@ -10,24 +10,24 @@ LL | | })
1010
|
1111
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `*const u8`
1212
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
1414
|
1515
LL | bar(Foo(std::ptr::null())).await;
1616
| ---------------- ^^^^^^ await occurs here, with `std::ptr::null()` maybe used later
1717
| |
1818
| has type `*const u8` which is not `Send`
1919
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
2121
|
2222
LL | bar(Foo(std::ptr::null())).await;
2323
| ^
2424
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
2626
|
2727
LL | bar(Foo(std::ptr::null())).await;
2828
| ^^^^^^^^^^^^^^^^^^^^^
2929
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
3131
|
3232
LL | fn assert_send<T: Send>(_: T) {}
3333
| ^^^^ required by this bound in `assert_send`

src/test/ui/async-await/issues/issue-65436-raw-ptr-not-send.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
// edition:2018
2+
// revisions: no_drop_tracking drop_tracking
3+
// [drop_tracking] check-pass
4+
// [drop_tracking] compile-flags: -Zdrop-tracking=yes
5+
// [no_drop_tracking] compile-flags: -Zdrop-tracking=no
26

37
struct Foo(*const u8);
48

@@ -10,7 +14,7 @@ fn assert_send<T: Send>(_: T) {}
1014

1115
fn main() {
1216
assert_send(async {
13-
//~^ ERROR future cannot be sent between threads safely
17+
//[no_drop_tracking]~^ ERROR future cannot be sent between threads safely
1418
bar(Foo(std::ptr::null())).await;
1519
})
1620
}

0 commit comments

Comments
 (0)