[][src]Function rustc_driver::in_named_rustc_thread

pub fn in_named_rustc_thread<F, R>(
    name: String,
    f: F
) -> Result<R, Box<Any + Send>> where
    F: FnOnce() -> R + Send + 'static,
    R: Send + 'static, 
🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Runs f in a suitable thread for running rustc; returns a Result with either the return value of f or -- if a panic occurs -- the panic value.

This version applies the given name to the thread. This is used by rustdoc to ensure consistent doctest output across platforms and executions.