Skip to content

Commit 2e789b9

Browse files
committed
Add test for rust-lang#59972
1 parent 77a6d29 commit 2e789b9

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// compile-flags: --edition=2018
2+
3+
#![feature(async_await, await_macro)]
4+
5+
pub enum Uninhabited { }
6+
7+
fn uninhabited_async() -> Uninhabited {
8+
unreachable!()
9+
}
10+
11+
async fn noop() { }
12+
13+
#[allow(unused)]
14+
async fn contains_never() {
15+
let error = uninhabited_async();
16+
await!(noop());
17+
let error2 = error;
18+
}
19+
20+
#[allow(unused_must_use)]
21+
fn main() {
22+
contains_never();
23+
}

0 commit comments

Comments
 (0)