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

Tuple Fields§

§0: RefCell<Tables<'tcx>>

Trait Implementations§

source§

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

source§

fn instance_name(&self, def: InstanceDef, trimmed: bool) -> Symbol

Retrieve the instance name for diagnostic messages.

This will return the specialized name, e.g., Vec<char>::new.

source§

fn target_info(&self) -> MachineInfo

Return information about the target machine.
source§

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

source§

fn all_local_items(&self) -> CrateItems

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

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

Retrieve the body of a function. This function will panic if the body is not available.
source§

fn has_body(&self, def: DefId) -> bool

Check whether the body of a function is available.
source§

fn all_trait_decls(&self) -> TraitDecls

source§

fn trait_decls(&self, crate_num: CrateNum) -> TraitDecls

source§

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

source§

fn all_trait_impls(&self) -> ImplTraitDecls

source§

fn trait_impls(&self, crate_num: CrateNum) -> ImplTraitDecls

source§

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

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 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 def_name(&self, def_id: DefId, trimmed: bool) -> Symbol

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 item_kind(&self, item: CrateItem) -> ItemKind

Returns the kind of given DefId
source§

fn is_foreign_item(&self, item: DefId) -> bool

Returns whether this is a foreign item.
source§

fn adt_kind(&self, def: AdtDef) -> AdtKind

Returns the kind of a given algebraic data type
source§

fn adt_is_box(&self, def: AdtDef) -> bool

Returns if the ADT is a box.
source§

fn adt_is_simd(&self, def: AdtDef) -> bool

Returns whether this ADT is simd.
source§

fn adt_is_cstr(&self, def: AdtDef) -> bool

Returns whether this definition is a C string.
source§

fn fn_sig(&self, def: FnDef, args: &GenericArgs) -> PolyFnSig

Retrieve the function signature for the given generic arguments.
source§

fn closure_sig(&self, args: &GenericArgs) -> PolyFnSig

Retrieve the closure signature for the given generic arguments.
source§

fn adt_variants_len(&self, def: AdtDef) -> usize

The number of variants in this ADT.
source§

fn variant_name(&self, def: VariantDef) -> Symbol

The name of a variant.
source§

fn variant_fields(&self, def: VariantDef) -> Vec<FieldDef>

source§

fn eval_target_usize(&self, cnst: &Const) -> Result<u64, Error>

Evaluate constant as a target usize.
source§

fn usize_to_const(&self, val: u64) -> Result<Const, Error>

Create a target usize constant for the given value.
source§

fn new_rigid_ty(&self, kind: RigidTy) -> Ty

Create a new type from the given kind.
source§

fn new_box_ty(&self, ty: Ty) -> Ty

Create a new box type, Box<T>, for the given inner type T.
source§

fn def_ty(&self, item: DefId) -> Ty

Returns the type of given crate item.
source§

fn def_ty_with_args(&self, item: DefId, args: &GenericArgs) -> Ty

Returns the type of given definition instantiated with the given arguments.
source§

fn const_literal(&self, cnst: &Const) -> String

Returns literal value of a const as a string.
source§

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

Span of an item
source§

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

Obtain the representation of a type.
source§

fn rigid_ty_discriminant_ty(&self, ty: &RigidTy) -> Ty

source§

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

Get the body of an Instance which is already monomorphized.
source§

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

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

fn instance_args(&self, def: InstanceDef) -> GenericArgs

Get the instantiation types.
source§

fn instance_abi(&self, def: InstanceDef) -> Result<FnAbi, Error>

Get an instance ABI.
source§

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

Get the instance.
source§

fn instance_mangled_name(&self, instance: InstanceDef) -> Symbol

Get the instance mangled name.
source§

fn is_empty_drop_shim(&self, def: InstanceDef) -> bool

Check if this is an empty DropGlue shim.
source§

fn mono_instance(&self, def_id: DefId) -> 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.
source§

fn resolve_drop_in_place(&self, ty: Ty) -> Instance

Resolve an instance for drop_in_place for the given type.
source§

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

Resolve instance for a function pointer.
source§

fn resolve_closure( &self, def: ClosureDef, args: &GenericArgs, kind: ClosureKind ) -> Option<Instance>

Resolve instance for a closure with the requested type.
source§

fn eval_instance( &self, def: InstanceDef, const_ty: Ty ) -> Result<Allocation, Error>

Try to evaluate an instance into a constant.
source§

fn eval_static_initializer(&self, def: StaticDef) -> Result<Allocation, Error>

Evaluate a static’s initializer.
source§

fn global_alloc(&self, alloc: AllocId) -> GlobalAlloc

Retrieve global allocation for the given allocation ID.
source§

fn vtable_allocation(&self, global_alloc: &GlobalAlloc) -> Option<AllocId>

Retrieve the id for the virtual table.
source§

fn krate(&self, def_id: DefId) -> Crate

source§

fn ty_layout(&self, ty: Ty) -> Result<Layout, Error>

Get the layout of a type.
source§

fn layout_shape(&self, id: Layout) -> LayoutShape

Get the layout shape.

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