Skip to main content

wip_future

Macro wip_future 

Source
macro_rules! wip_future {
    () => { ... };
    ($($arg:tt)+) => { ... };
}
Expand description

Indicates unfinished code, emits a deprecation warning, panics if reached, works for impl Future.

Regular wip does not work for futures, because ! does not implement Future.

§Examples

Use when Rust cannot infer the concrete type of a future you didn’t write yet:

fn my_unfinished_future() -> impl Future<Output=usize> {
    wip::wip_future!()
}

Otherwise, you can use the regular wip.

§Another branch specifies the type

fn my_unfinished_future() -> impl Future<Output=usize> {
    if true {
        std::future::ready(42)
    } else {
        wip::wip!()
    }
}

§Specific return type expected

fn my_unfinished_future() -> std::future::Ready<usize> {
    wip::wip!()
}