-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Code:
use futures::future;
use futures::Future;
fn f() -> impl Future<Item = (), Error = ()> {
future::ok(unimplemented!())
}
fn main() {
let s = f();
tokio::run(s);
}
And when build with cargo build
, It will says the future::ok(unimplemented!())
is unreachable expression.
but when cargo run
, I got a panic: thread 'main' panicked at 'not yet implemented', src\main.rs:5:16
. the unimplemented!()
macro is worked.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.