Struct rustdoc::core::DocContext [−][src]
pub struct DocContext<'a, 'tcx: 'a, 'rcx: 'a> { pub tcx: TyCtxt<'a, 'tcx, 'tcx>, pub resolver: &'a RefCell<Resolver<'rcx>>, pub mod_ids: RefCell<Vec<NodeId>>, pub crate_name: Option<String>, pub cstore: Rc<CrateStore>, pub populated_all_crate_impls: Cell<bool>, pub access_levels: RefCell<AccessLevels<DefId>>, pub renderinfo: RefCell<RenderInfo>, pub external_traits: RefCell<FxHashMap<DefId, Trait>>, pub active_extern_traits: RefCell<Vec<DefId>>, pub ty_substs: RefCell<FxHashMap<Def, Type>>, pub lt_substs: RefCell<FxHashMap<DefId, Lifetime>>, pub impl_trait_bounds: RefCell<FxHashMap<DefId, Vec<TyParamBound>>>, pub send_trait: Option<DefId>, pub fake_def_ids: RefCell<FxHashMap<CrateNum, DefId>>, pub all_fake_def_ids: RefCell<FxHashSet<DefId>>, pub generated_synthetics: RefCell<FxHashSet<(DefId, DefId)>>, }
Fields
tcx: TyCtxt<'a, 'tcx, 'tcx>
resolver: &'a RefCell<Resolver<'rcx>>
mod_ids: RefCell<Vec<NodeId>>
The stack of module NodeIds up till this point
crate_name: Option<String>
cstore: Rc<CrateStore>
populated_all_crate_impls: Cell<bool>
access_levels: RefCell<AccessLevels<DefId>>
Later on moved into clean::Crate
renderinfo: RefCell<RenderInfo>
Later on moved into html::render::CACHE_KEY
external_traits: RefCell<FxHashMap<DefId, Trait>>
Later on moved through clean::Crate
into html::render::CACHE_KEY
active_extern_traits: RefCell<Vec<DefId>>
Used while populating external_traits
to ensure we don't process the same trait twice at
the same time.
ty_substs: RefCell<FxHashMap<Def, Type>>
Table type parameter definition -> substituted type
lt_substs: RefCell<FxHashMap<DefId, Lifetime>>
Table node id of lifetime parameter definition -> substituted lifetime
impl_trait_bounds: RefCell<FxHashMap<DefId, Vec<TyParamBound>>>
Table DefId of impl Trait
in argument position -> bounds
send_trait: Option<DefId>
fake_def_ids: RefCell<FxHashMap<CrateNum, DefId>>
all_fake_def_ids: RefCell<FxHashSet<DefId>>
generated_synthetics: RefCell<FxHashSet<(DefId, DefId)>>
Maps (type_id, trait_id) -> auto trait impl
Methods
impl<'a, 'tcx, 'rcx> DocContext<'a, 'tcx, 'rcx>
[src]
impl<'a, 'tcx, 'rcx> DocContext<'a, 'tcx, 'rcx>
pub fn sess(&self) -> &Session
[src]
pub fn sess(&self) -> &Session
pub fn enter_alias<F, R>(
&self,
ty_substs: FxHashMap<Def, Type>,
lt_substs: FxHashMap<DefId, Lifetime>,
f: F
) -> R where
F: FnOnce() -> R,
[src]
pub fn enter_alias<F, R>(
&self,
ty_substs: FxHashMap<Def, Type>,
lt_substs: FxHashMap<DefId, Lifetime>,
f: F
) -> R where
F: FnOnce() -> R,
Call the closure with the given parameters set as the substitutions for a type alias' RHS.
Auto Trait Implementations
impl<'a, 'tcx, 'rcx> !Send for DocContext<'a, 'tcx, 'rcx>
impl<'a, 'tcx, 'rcx> !Send for DocContext<'a, 'tcx, 'rcx>
impl<'a, 'tcx, 'rcx> !Sync for DocContext<'a, 'tcx, 'rcx>
impl<'a, 'tcx, 'rcx> !Sync for DocContext<'a, 'tcx, 'rcx>