[][src]Function core::future::pending

pub fn pending<T>() -> Pending<T>
🔬 This is a nightly-only experimental API. (future_readiness_fns #70921)

Creates a future which never resolves, representing a computation that never finishes.

Examples

#![feature(future_readiness_fns)]
use core::future;

let future = future::pending();
let () = future.await;
unreachable!();
Run