Struct rustc_smir::rustc_smir::TablesWrapper
source · 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>
impl<'tcx> Context for TablesWrapper<'tcx>
source§fn local_crate(&self) -> Crate
fn local_crate(&self) -> Crate
Get information about the local crate.
source§fn external_crates(&self) -> Vec<Crate>
fn external_crates(&self) -> Vec<Crate>
Retrieve a list of all external crates.
source§fn name_of_def_id(&self, def_id: DefId) -> String
fn name_of_def_id(&self, def_id: DefId) -> String
Returns the name of given
DefIdsource§fn span_to_string(&self, span: Span) -> String
fn span_to_string(&self, span: Span) -> String
Returns printable, human readable form of
Spansource§fn get_filename(&self, span: &Span) -> Filename
fn get_filename(&self, span: &Span) -> Filename
Return filename from given
Span, for diagnostic purposessource§fn span_of_an_item(&self, def_id: DefId) -> Span
fn span_of_an_item(&self, def_id: DefId) -> Span
Span of an itemsource§fn all_local_items(&self) -> CrateItems
fn all_local_items(&self) -> CrateItems
Retrieve all items of the local crate that have a MIR associated with them.
fn entry_fn(&self) -> Option<CrateItem>
fn all_trait_decls(&self) -> TraitDecls
fn trait_decl(&self, trait_def: &TraitDef) -> TraitDecl
fn all_trait_impls(&self) -> ImplTraitDecls
fn trait_impl(&self, impl_def: &ImplDef) -> ImplTrait
fn mir_body(&self, item: DefId) -> Body
fn generics_of(&self, def_id: DefId) -> Generics
fn predicates_of(&self, def_id: DefId) -> GenericPredicates
fn explicit_predicates_of(&self, def_id: DefId) -> GenericPredicates
source§fn instance_body(&self, def: InstanceDef) -> Body
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
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
fn instance_def_id(&self, def: InstanceDef) -> DefId
Get the instance.
source§fn instance_mangled_name(&self, def: InstanceDef) -> String
fn instance_mangled_name(&self, def: InstanceDef) -> String
Get the instance mangled name.
source§fn mono_instance(&self, item: CrateItem) -> Instance
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
fn requires_monomorphization(&self, def_id: DefId) -> bool
Item requires monomorphization.
source§fn resolve_instance(&self, def: FnDef, args: &GenericArgs) -> Option<Instance>
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> 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
Mutably borrows from an owned value. Read more
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