Struct rustc_smir::rustc_smir::Tables
source · pub struct Tables<'tcx> {
pub tcx: TyCtxt<'tcx>,
pub def_ids: Vec<DefId>,
pub types: Vec<Ty<'tcx>>,
}Fields§
§tcx: TyCtxt<'tcx>§def_ids: Vec<DefId>§types: Vec<Ty<'tcx>>Implementations§
source§impl<'tcx> Tables<'tcx>
impl<'tcx> Tables<'tcx>
pub fn item_def_id(&self, item: &CrateItem) -> DefId
pub fn crate_item(&mut self, did: DefId) -> CrateItem
pub fn adt_def(&mut self, did: DefId) -> AdtDef
pub fn foreign_def(&mut self, did: DefId) -> ForeignDef
pub fn fn_def(&mut self, did: DefId) -> FnDef
pub fn closure_def(&mut self, did: DefId) -> ClosureDef
pub fn generator_def(&mut self, did: DefId) -> GeneratorDef
pub fn alias_def(&mut self, did: DefId) -> AliasDef
pub fn param_def(&mut self, did: DefId) -> ParamDef
pub fn br_named_def(&mut self, did: DefId) -> BrNamedDef
pub fn trait_def(&mut self, did: DefId) -> TraitDef
fn create_def_id(&mut self, did: DefId) -> DefId
Trait Implementations§
source§impl<'tcx> Context for Tables<'tcx>
impl<'tcx> Context for Tables<'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 all_local_items(&mut self) -> CrateItems
fn all_local_items(&mut self) -> CrateItems
Retrieve all items of the local crate that have a MIR associated with them.
fn entry_fn(&mut self) -> Option<CrateItem>
fn mir_body(&mut self, item: &CrateItem) -> Body
source§fn rustc_tables(&mut self, f: &mut dyn FnMut(&mut Tables<'_>))
fn rustc_tables(&mut self, f: &mut dyn FnMut(&mut Tables<'_>))
HACK: Until we have fully stable consumers, we need an escape hatch
to get
DefIds out of CrateItems.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> 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:56 bytes