rustc_middle::ty::context::tls

Function with_context_opt

source
pub fn with_context_opt<F, R>(f: F) -> R
where F: for<'a, 'tcx> FnOnce(Option<&ImplicitCtxt<'a, 'tcx>>) -> R,
Expand description

Allows access to the current ImplicitCtxt in a closure if one is available.