summaryrefslogtreecommitdiffstats
path: root/tests/ui/async-await/unreachable-lint.rs
blob: ca18cfde4f2f5526d9e2f7014bbd28fefe3e1a1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// check-pass
// edition:2018
#![deny(unreachable_code)]

async fn foo() {
    endless().await;
}

async fn endless() -> ! {
    loop {}
}

fn main() { }