Skip to content

Commit

Permalink
Rollup merge of rust-lang#60572 - tmandry:issue-59972, r=RalfJung,oli…
Browse files Browse the repository at this point in the history
…-obk

Add test for rust-lang#59972

This PR adds a test for rust-lang#59972, which was fixed in rust-lang#59897.

Closes rust-lang#59972.

r? @eddyb
  • Loading branch information
Centril authored May 8, 2019
2 parents 59ff113 + 2e789b9 commit b04f87f
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 b04f87f

Please sign in to comment.