-
-
Notifications
You must be signed in to change notification settings - Fork 90
Closed
Description
#![feature(never_type)]
use async_trait::async_trait;
#[async_trait]
pub trait Trait {
async fn f() -> !;
}
#[async_trait]
impl Trait for () {
async fn f() -> ! {
loop {
std::thread::sleep(std::time::Duration::from_millis(1));
}
}
}
warning: unreachable expression
--> src/lib.rs:10:1
|
10 | #[async_trait]
| ^^^^^^^^^^^^^^
| |
| unreachable expression
| any code following this expression is unreachable
|
= note: `#[warn(unreachable_code)]` on by default
= note: this warning originates in the attribute macro `async_trait` (in Nightly builds, run with -Z macro-backtrace for more info)
Metadata
Metadata
Assignees
Labels
No labels