Function rustc::ty::tls::enter_global[][src]

pub fn enter_global<'gcx, F, R>(gcx: &GlobalCtxt<'gcx>, f: F) -> R where
    F: for<'a> FnOnce(TyCtxt<'a, 'gcx, 'gcx>) -> R, 
🔬 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?

Enters GlobalCtxt by setting up libsyntax callbacks and creating a initial TyCtxt and ImplicitCtxt. This happens once per rustc session and TyCtxts only exists inside the f function.