blob: d7ef929517c74eaabfbb60f0d6ee39d4372b46e8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
// edition:2018
// revisions: no_drop_tracking drop_tracking drop_tracking_mir
// [drop_tracking] compile-flags: -Zdrop-tracking
// [drop_tracking_mir] compile-flags: -Zdrop-tracking-mir
// [drop_tracking] check-pass
// [drop_tracking_mir] check-pass
struct Foo(*const u8);
unsafe impl Send for Foo {}
async fn bar(_: Foo) {}
fn assert_send<T: Send>(_: T) {}
fn main() {
assert_send(async {
//[no_drop_tracking]~^ ERROR future cannot be sent between threads safely
bar(Foo(std::ptr::null())).await;
})
}
|