-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove the interprter's check for project_downcast on unihabited vari…
…ants
- Loading branch information
Showing
2 changed files
with
25 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/tools/miri/tests/pass/issues/issue-115145-project-downcast-uninhabited.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#![feature(noop_waker)] | ||
use std::future::Future; | ||
|
||
enum Runtime {} | ||
|
||
async fn run(_: Runtime) {} | ||
|
||
async fn apply_timeout() { | ||
let c = async {}; | ||
match None::<Runtime> { | ||
None => { | ||
c.await; | ||
}, | ||
Some(r) => { | ||
run(r).await; | ||
} | ||
} | ||
} | ||
|
||
fn main() { | ||
let waker = std::task::Waker::noop(); | ||
let mut ctx = std::task::Context::from_waker(&waker); | ||
let fut = std::pin::pin!(apply_timeout()); | ||
let _ = fut.poll(&mut ctx); | ||
} |