Skip to content

Commit ace1fa8

Browse files
committed
Add a regression test for rust-lang#115145
1 parent e6d1b0e commit ace1fa8

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#![feature(noop_waker)]
2+
use std::future::Future;
3+
4+
enum Runtime {}
5+
6+
async fn run(_: Runtime) {}
7+
8+
async fn apply_timeout() {
9+
let c = async {};
10+
match None::<Runtime> {
11+
None => {
12+
c.await;
13+
},
14+
Some(r) => {
15+
run(r).await;
16+
}
17+
}
18+
}
19+
20+
fn main() {
21+
let waker = std::task::Waker::noop();
22+
let mut ctx = std::task::Context::from_waker(&waker);
23+
let fut = std::pin::pin!(apply_timeout());
24+
let _ = fut.poll(&mut ctx);
25+
}

0 commit comments

Comments
 (0)