Struct rustc::ty::context::GlobalCtxt [−][src]
pub struct GlobalCtxt<'tcx> { global_arenas: &'tcx GlobalArenas<'tcx>, global_interners: CtxtInterners<'tcx>, cstore: &'tcx CrateStore, pub sess: &'tcx Session, pub dep_graph: DepGraph, on_disk_query_result_cache: OnDiskCache<'tcx>, pub types: CommonTypes<'tcx>, trait_map: FxHashMap<DefIndex, Lrc<FxHashMap<ItemLocalId, Lrc<StableVec<TraitCandidate>>>>>, export_map: FxHashMap<DefId, Lrc<Vec<Export>>>, pub hir: Map<'tcx>, pub def_path_hash_to_def_id: Option<FxHashMap<DefPathHash, DefId>>, pub maps: Maps<'tcx>, freevars: FxHashMap<DefId, Lrc<Vec<Freevar>>>, maybe_unused_trait_imports: FxHashSet<DefId>, maybe_unused_extern_crates: Vec<(DefId, Span)>, pub rcache: Lock<FxHashMap<CReaderCacheKey, Ty<'tcx>>>, pub selection_cache: SelectionCache<'tcx>, pub evaluation_cache: EvaluationCache<'tcx>, pub crate_name: Symbol, pub data_layout: TargetDataLayout, stability_interner: Lock<FxHashSet<&'tcx Stability>>, pub interpret_interner: InterpretInterner<'tcx>, layout_interner: Lock<FxHashSet<&'tcx LayoutDetails>>, pub tx_to_llvm_workers: Lock<Sender<Box<Any + Send>>>, output_filenames: Arc<OutputFilenames>, }
🔬 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?
Fields
global_arenas: &'tcx GlobalArenas<'tcx>
🔬 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?
global_interners: CtxtInterners<'tcx>
🔬 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?
cstore: &'tcx CrateStore
🔬 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?
sess: &'tcx Session
🔬 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?
dep_graph: DepGraph
🔬 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?
on_disk_query_result_cache: OnDiskCache<'tcx>
🔬 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?
This provides access to the incr. comp. on-disk cache for query results.
Do not access this directly. It is only meant to be used by
DepGraph::try_mark_green()
and the query infrastructure in ty::maps
.
types: CommonTypes<'tcx>
🔬 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?
Common types, pre-interned for your convenience.
trait_map: FxHashMap<DefIndex, Lrc<FxHashMap<ItemLocalId, Lrc<StableVec<TraitCandidate>>>>>
🔬 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?
Map indicating what traits are in scope for places where this is relevant; generated by resolve.
export_map: FxHashMap<DefId, Lrc<Vec<Export>>>
🔬 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?
Export map produced by name resolution.
hir: Map<'tcx>
🔬 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?
def_path_hash_to_def_id: Option<FxHashMap<DefPathHash, DefId>>
🔬 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?
A map from DefPathHash -> DefId. Includes DefIds from the local crate as well as all upstream crates. Only populated in incremental mode.
maps: Maps<'tcx>
🔬 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?
freevars: FxHashMap<DefId, Lrc<Vec<Freevar>>>
🔬 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?
maybe_unused_trait_imports: FxHashSet<DefId>
🔬 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?
maybe_unused_extern_crates: Vec<(DefId, Span)>
🔬 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?
rcache: Lock<FxHashMap<CReaderCacheKey, Ty<'tcx>>>
🔬 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?
selection_cache: SelectionCache<'tcx>
🔬 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?
Caches the results of trait selection. This cache is used for things that do not have to do with the parameters in scope.
evaluation_cache: EvaluationCache<'tcx>
🔬 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?
Caches the results of trait evaluation. This cache is used
for things that do not have to do with the parameters in scope.
Merge this with selection_cache
?
crate_name: Symbol
🔬 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?
The definite name of the current crate after taking into account attributes, commandline parameters, etc.
data_layout: TargetDataLayout
🔬 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?
Data layout specification for the current target.
stability_interner: Lock<FxHashSet<&'tcx Stability>>
🔬 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?
interpret_interner: InterpretInterner<'tcx>
🔬 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?
layout_interner: Lock<FxHashSet<&'tcx LayoutDetails>>
🔬 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?
tx_to_llvm_workers: Lock<Sender<Box<Any + Send>>>
🔬 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?
A general purpose channel to throw data out the back towards LLVM worker threads.
This is intended to only get used during the trans phase of the compiler when satisfying the query for a particular codegen unit. Internally in the query it'll send data along this channel to get processed later.
output_filenames: Arc<OutputFilenames>
🔬 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?
Methods
impl<'gcx: 'tcx, 'tcx> GlobalCtxt<'gcx>
[src]
impl<'gcx: 'tcx, 'tcx> GlobalCtxt<'gcx>
pub fn enter_local<F, R>(&self, arena: &'tcx SyncDroplessArena, f: F) -> R where
F: for<'a> FnOnce(TyCtxt<'a, 'gcx, 'tcx>) -> R,
[src]
pub fn enter_local<F, R>(&self, arena: &'tcx SyncDroplessArena, f: F) -> R where
F: for<'a> FnOnce(TyCtxt<'a, 'gcx, 'tcx>) -> 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?
Call the closure with a local TyCtxt
using the given arena.
Auto Trait Implementations
impl<'tcx> !Send for GlobalCtxt<'tcx>
impl<'tcx> !Send for GlobalCtxt<'tcx>
impl<'tcx> !Sync for GlobalCtxt<'tcx>
impl<'tcx> !Sync for GlobalCtxt<'tcx>