rust/src/test/ui/async-await/unreachable-lint.rs
David Wood 870b47fee4
typeck: silence unreachable code from await
This commit silences the unreachable code lint when it originates from
within a await desugaring.

Signed-off-by: David Wood <david@davidtw.co>
2019-09-30 21:27:18 +01:00

14 lines
154 B
Rust

// check-pass
// edition:2018
#![deny(unreachable_code)]
async fn foo() {
endless().await;
}
async fn endless() -> ! {
loop {}
}
fn main() { }