pub struct Tables<'tcx> {
    pub(crate) tcx: TyCtxt<'tcx>,
    pub(crate) def_ids: IndexMap<DefId, DefId>,
    pub(crate) alloc_ids: IndexMap<AllocId, AllocId>,
    pub(crate) spans: IndexMap<Span, Span>,
    pub(crate) types: IndexMap<Ty<'tcx>, Ty>,
    pub(crate) instances: IndexMap<Instance<'tcx>, InstanceDef>,
    pub(crate) constants: IndexMap<Const<'tcx>, ConstId>,
}

Fields§

§tcx: TyCtxt<'tcx>§def_ids: IndexMap<DefId, DefId>§alloc_ids: IndexMap<AllocId, AllocId>§spans: IndexMap<Span, Span>§types: IndexMap<Ty<'tcx>, Ty>§instances: IndexMap<Instance<'tcx>, InstanceDef>§constants: IndexMap<Const<'tcx>, ConstId>

Implementations§

source§

impl<'tcx> Tables<'tcx>

source

pub fn crate_item(&mut self, did: DefId) -> CrateItem

source

pub fn adt_def(&mut self, did: DefId) -> AdtDef

source

pub fn foreign_def(&mut self, did: DefId) -> ForeignDef

source

pub fn fn_def(&mut self, did: DefId) -> FnDef

source

pub fn closure_def(&mut self, did: DefId) -> ClosureDef

source

pub fn coroutine_def(&mut self, did: DefId) -> CoroutineDef

source

pub fn alias_def(&mut self, did: DefId) -> AliasDef

source

pub fn param_def(&mut self, did: DefId) -> ParamDef

source

pub fn br_named_def(&mut self, did: DefId) -> BrNamedDef

source

pub fn trait_def(&mut self, did: DefId) -> TraitDef

source

pub fn generic_def(&mut self, did: DefId) -> GenericDef

source

pub fn const_def(&mut self, did: DefId) -> ConstDef

source

pub fn impl_def(&mut self, did: DefId) -> ImplDef

source

pub fn region_def(&mut self, did: DefId) -> RegionDef

source

pub fn coroutine_witness_def(&mut self, did: DefId) -> CoroutineWitnessDef

source

pub fn prov(&mut self, aid: AllocId) -> Prov

source

pub(crate) fn create_def_id(&mut self, did: DefId) -> DefId

source

pub(crate) fn create_alloc_id(&mut self, aid: AllocId) -> AllocId

source

pub(crate) fn create_span(&mut self, span: Span) -> Span

source

pub(crate) fn instance_def(&mut self, instance: Instance<'tcx>) -> InstanceDef

source

pub(crate) fn static_def(&mut self, did: DefId) -> StaticDef

source§

impl<'tcx> Tables<'tcx>

source

pub(crate) fn intern_ty(&mut self, ty: Ty<'tcx>) -> Ty

source

pub(crate) fn intern_const(&mut self, constant: Const<'tcx>) -> ConstId

source

pub(crate) fn has_body(&self, instance: Instance<'tcx>) -> bool

Trait Implementations§

source§

impl<'tcx> Index<DefId> for Tables<'tcx>

§

type Output = DefId

The returned type after indexing.
source§

fn index(&self, index: DefId) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
source§

impl<'tcx> Index<Span> for Tables<'tcx>

§

type Output = Span

The returned type after indexing.
source§

fn index(&self, index: Span) -> &Self::Output

Performs the indexing (container[index]) operation. Read more

Auto Trait Implementations§

§

impl<'tcx> !RefUnwindSafe for Tables<'tcx>

§

impl<'tcx> !Send for Tables<'tcx>

§

impl<'tcx> !Sync for Tables<'tcx>

§

impl<'tcx> Unpin for Tables<'tcx>

§

impl<'tcx> !UnwindSafe for Tables<'tcx>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.

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: 344 bytes