We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e6d1b0e commit ace1fa8Copy full SHA for ace1fa8
src/tools/miri/tests/pass/uninhabited-coroutine-variant.rs
@@ -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