Add test for #59972

This commit is contained in:
Tyler Mandry 2019-05-05 17:23:47 -07:00
parent 77a6d29f48
commit 2e789b9f0d

View File

@ -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();
}