1 // Regression test for <https://github.com/rust-lang/rust/issues/73137>
5 // revisions: normal drop-tracking
6 // [normal]compile-flags: -Zdrop-tracking=no
7 // [drop-tracking]compile-flags: -Zdrop-tracking
10 use std::future::Future;
11 use std::task::{Waker, Wake, Context};
15 impl Wake for DummyWaker {
16 fn wake(self: Arc<Self>) {}
28 let mut fut = Box::pin(async {
34 // An error in the generator transform caused `b` to be overwritten with `a` when `b` was
37 assert_ne!(0usize, unsafe { std::mem::transmute(action.b) });
41 let waker = Waker::from(Arc::new(DummyWaker));
42 let mut cx = Context::from_waker(&waker);
43 let _ = fut.as_mut().poll(&mut cx);