1 // revisions: no_drop_tracking drop_tracking drop_tracking_mir
2 // [drop_tracking] compile-flags: -Zdrop-tracking
3 // [drop_tracking_mir] compile-flags: -Zdrop-tracking-mir
5 use std::future::Future;
7 use std::task::{Context, Poll};
9 fn spawn<T: Send>(_: T) {}
12 impl Future for AFuture{
15 fn poll(mut self: Pin<&mut Self>, _: &mut Context<'_>) -> Poll<()> {
21 spawn(async { //~ ERROR future cannot be sent between threads safely
22 let a = std::ptr::null_mut::<()>(); // `*mut ()` is not `Send`