1 // compile-flags: -C opt-level=3
2 // aux-build: issue-72470-lib.rs
6 // Regression test for issue #72470, using the minimization
7 // in https://github.com/jonas-schievink/llvm-error
9 extern crate issue_72470_lib;
11 use std::future::Future;
14 use std::task::Poll::{Pending, Ready};
28 #[allow(unused_must_use)]
30 let mut rx = issue_72470_lib::unbounded_channel::<Msg>();
31 let entity = Mutex::new(());
32 issue_72470_lib::run(async move {
35 let mut fut = rx.recv();
36 issue_72470_lib::poll_fn(|cx| {
38 let fut = unsafe { Pin::new_unchecked(&mut fut) };
39 let out = match fut.poll(cx) {
45 #[allow(unused_variables)]
50 return Ready(Out::_0(out));
57 Out::_0(Some(_msg)) => {
60 Out::_0(None) => unreachable!(),