Skip to content

Commit

Permalink
Add test for #59972
Browse files Browse the repository at this point in the history
  • Loading branch information
tmandry committed May 7, 2019
1 parent 77a6d29 commit 2e789b9
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/test/run-pass/generator/issue-59972.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// compile-flags: --edition=2018

#![feature(async_await, await_macro)]

pub enum Uninhabited { }

fn uninhabited_async() -> Uninhabited {
unreachable!()
}

async fn noop() { }

#[allow(unused)]
async fn contains_never() {
let error = uninhabited_async();
await!(noop());
let error2 = error;
}

#[allow(unused_must_use)]
fn main() {
contains_never();
}

0 comments on commit 2e789b9

Please sign in to comment.