Closed
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.