Closed
Description
I tried this code:
async fn foo() {
endless().await;
}
async fn endless() -> ! {
loop {}
}
I expected to see this happen: no build warn
Instead, this happened:
warning: unreachable expression
--> src/main.rs:8:5
|
8 | endless().await;
| ^^^^^^^^^^^^^^^
|
= note: #[warn(unreachable_code)] on by default
Meta
rustc --version --verbose
:
rustc 1.37.0-nightly (5f3656ce9 2019-06-11)
binary: rustc
commit-hash: 5f3656ce9a2212fad872605b7a4ee103a155e9f3
commit-date: 2019-06-11
host: x86_64-unknown-linux-gnu
release: 1.37.0-nightly
LLVM version: 8.0