]>
Commit | Line | Data |
---|---|---|
dfeec247 | 1 | // edition:2018 |
f2b60f7d FG |
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 | |
dfeec247 XL |
6 | |
7 | struct Foo(*const u8); | |
8 | ||
9 | unsafe impl Send for Foo {} | |
10 | ||
11 | async fn bar(_: Foo) {} | |
12 | ||
13 | fn assert_send<T: Send>(_: T) {} | |
14 | ||
15 | fn main() { | |
16 | assert_send(async { | |
f2b60f7d | 17 | //[no_drop_tracking]~^ ERROR future cannot be sent between threads safely |
dfeec247 XL |
18 | bar(Foo(std::ptr::null())).await; |
19 | }) | |
20 | } |