You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: lib.rs
    path of file: ./repos/Rocket/core/lib/src
    
    the code of the file until where you have to start completion: #![recursion_limit="256"]

#![doc(html_root_url = "https://api.rocket.rs/master")]
#![doc(html_favicon_url = "https://rocket.rs/images/favicon.ico")]
#![doc(html_logo_url = "https://rocket.rs/images/logo-boxed.png")]
#![cfg_attr(nightly, feature(doc_cfg))]
#![cfg_attr(nightly, feature(decl_macro))]

#![warn(rust_2018
    
pub fn async_main<R>(fut: impl std::future::Future<Output = R> + Send) -> R {
    // FIXME: We need to run `fut` to get the user's `Figment` to properly set
    // up the async env, but we need the async env to run `fut`. So we're stuck.
    // Tokio doesn't let us take the state from one async env and migrate it to
    // another, so we need to use one, making this impossible.
    //
    // So as a result, we only use values from Rocket's figment. These
    // values won't reflect swaps of `Rocket` in attach fairings with different
    // config values, or values from non-Rocket configs. See tokio-rs/tokio#3329
    // for a necessary resolution in `tokio`.
    use config::bail_with_config_error as bail;

    let fig = Config::figment();
    let workers = fig.extract_inner(Config::WORKERS).unwrap_or_else(bail);
    let max_blocking = fig.extract_inner(Config::MAX_BLOCKING).unwrap_or_else(bail);
    let force = fig.focus(Config::SHUTDOWN).extract_inner("force").unwrap_or_else(bail);
    async_run(fut, workers, max_blocking, force, &format!("{WORKER_PREFIX}-thread"))
}