Add test for #59972
This commit is contained in:
parent
77a6d29f48
commit
2e789b9f0d
23
src/test/run-pass/generator/issue-59972.rs
Normal file
23
src/test/run-pass/generator/issue-59972.rs
Normal 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();
|
||||
}
|
Loading…
Reference in New Issue
Block a user