pub(crate) struct TablesWrapper<'tcx>(pub(crate) RefCell<Tables<'tcx>>);

Tuple Fields§

§0: RefCell<Tables<'tcx>>

Trait Implementations§

source§

impl<'tcx> Context for TablesWrapper<'tcx>

source§

fn local_crate(&self) -> Crate

Get information about the local crate.
source§

fn external_crates(&self) -> Vec<Crate>

Retrieve a list of all external crates.
source§

fn find_crates(&self, name: &str) -> Vec<Crate>

Find a crate with the given name.
source§

fn name_of_def_id(&self, def_id: DefId) -> String

Returns the name of given DefId
source§

fn span_to_string(&self, span: Span) -> String

Returns printable, human readable form of Span
source§

fn get_filename(&self, span: &Span) -> Filename

Return filename from given Span, for diagnostic purposes
source§

fn get_lines(&self, span: &Span) -> LineInfo

Return lines corresponding to this Span
source§

fn def_kind(&self, def_id: DefId) -> DefKind

Returns the kind of given DefId
source§

fn span_of_an_item(&self, def_id: DefId) -> Span

Span of an item
source§

fn all_local_items(&self) -> CrateItems

Retrieve all items of the local crate that have a MIR associated with them.
source§

fn entry_fn(&self) -> Option<CrateItem>

source§

fn all_trait_decls(&self) -> TraitDecls

source§

fn trait_decl(&self, trait_def: &TraitDef) -> TraitDecl

source§

fn all_trait_impls(&self) -> ImplTraitDecls

source§

fn trait_impl(&self, impl_def: &ImplDef) -> ImplTrait

source§

fn mir_body(&self, item: DefId) -> Body

source§

fn ty_kind(&self, ty: Ty) -> TyKind

Obtain the representation of a type.
source§

fn generics_of(&self, def_id: DefId) -> Generics

source§

fn predicates_of(&self, def_id: DefId) -> GenericPredicates

source§

fn explicit_predicates_of(&self, def_id: DefId) -> GenericPredicates

source§

fn instance_body(&self, def: InstanceDef) -> Body

Get the body of an Instance. FIXME: Monomorphize the body.
source§

fn instance_ty(&self, def: InstanceDef) -> Ty

Get the instance type with generic substitutions applied and lifetimes erased.
source§

fn instance_def_id(&self, def: InstanceDef) -> DefId

Get the instance.
source§

fn instance_mangled_name(&self, def: InstanceDef) -> String

Get the instance mangled name.
source§

fn mono_instance(&self, item: CrateItem) -> Instance

Convert a non-generic crate item into an instance. This function will panic if the item is generic.
source§

fn requires_monomorphization(&self, def_id: DefId) -> bool

Item requires monomorphization.
source§

fn resolve_instance(&self, def: FnDef, args: &GenericArgs) -> Option<Instance>

Resolve an instance from the given function definition and generic arguments.

Auto Trait Implementations§

§

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

§

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

§

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

§

impl<'tcx> Unpin for TablesWrapper<'tcx>

§

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

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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 Twhere 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 Twhere 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: 352 bytes