pub struct GlobalCtxt<'tcx> {Show 19 fields
pub arena: &'tcx WorkerLocal<Arena<'tcx>>,
pub hir_arena: &'tcx WorkerLocal<Arena<'tcx>>,
interners: CtxtInterners<'tcx>,
pub sess: &'tcx Session,
crate_types: Vec<CrateType>,
stable_crate_id: StableCrateId,
pub incr_comp_session: Option<&'tcx IncrCompSession>,
pub dep_graph: DepGraph,
pub prof: SelfProfilerRef,
pub types: CommonTypes<'tcx>,
pub lifetimes: CommonLifetimes<'tcx>,
pub consts: CommonConsts<'tcx>,
pub(crate) hooks: Providers,
untracked: Untracked,
pub query_system: QuerySystem<'tcx>,
pub caches: GlobalCaches<'tcx>,
pub data_layout: TargetDataLayout,
pub(crate) alloc_map: AllocMap<'tcx>,
current_gcx: CurrentGcx,
}Expand description
See TyCtxt for details about this type.
Fields§
§arena: &'tcx WorkerLocal<Arena<'tcx>>§hir_arena: &'tcx WorkerLocal<Arena<'tcx>>§interners: CtxtInterners<'tcx>§sess: &'tcx Session§crate_types: Vec<CrateType>§stable_crate_id: StableCrateIdThe stable_crate_id is constructed out of the crate name and all the
-C metadata arguments passed to the compiler. Its value forms a unique
global identifier for the crate. It is used to allow multiple crates
with the same name to coexist. See the
rustc_symbol_mangling crate for more information.
incr_comp_session: Option<&'tcx IncrCompSession>§dep_graph: DepGraph§prof: SelfProfilerRefThis duplicates Session::prof because this field is hot enough that accessing it via
self.sess.prof is a measurable slowdown (see #161332).
types: CommonTypes<'tcx>Common types, pre-interned for your convenience.
lifetimes: CommonLifetimes<'tcx>Common lifetimes, pre-interned for your convenience.
consts: CommonConsts<'tcx>Common consts, pre-interned for your convenience.
hooks: ProvidersHooks to be able to register functions in other crates that can then still be called from rustc_middle.
untracked: Untracked§query_system: QuerySystem<'tcx>§caches: GlobalCaches<'tcx>§data_layout: TargetDataLayoutData layout specification for the current target.
alloc_map: AllocMap<'tcx>Stores memory for globals (statics/consts).
current_gcx: CurrentGcxImplementations§
Auto Trait Implementations§
impl<'tcx> !Freeze for GlobalCtxt<'tcx>
impl<'tcx> !RefUnwindSafe for GlobalCtxt<'tcx>
impl<'tcx> !Send for GlobalCtxt<'tcx>
impl<'tcx> !Sync for GlobalCtxt<'tcx>
impl<'tcx> !Unpin for GlobalCtxt<'tcx>
impl<'tcx> !UnwindSafe for GlobalCtxt<'tcx>
impl<'tcx> DynSend for GlobalCtxt<'tcx>
impl<'tcx> DynSync for GlobalCtxt<'tcx>
impl<'tcx> UnsafeUnpin for GlobalCtxt<'tcx>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<K> IntoQueryKey<K> for K
impl<K> IntoQueryKey<K> for K
Source§fn into_query_key(self) -> K
fn into_query_key(self) -> K
Self to K.
This should always be a very cheap conversion, e.g. LocalDefId::to_def_id.Source§impl<T> MaybeResult<T> for T
impl<T> MaybeResult<T> for T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<I, T, U> Upcast<I, U> for Twhere
U: UpcastFrom<I, T>,
impl<I, T, U> Upcast<I, U> for Twhere
U: UpcastFrom<I, T>,
Source§impl<I, T> UpcastFrom<I, T> for T
impl<I, T> UpcastFrom<I, T> for T
fn upcast_from(from: T, _tcx: I) -> T
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
Source§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 122792 bytes