Struct rustc_mir_transform::ty::Instance [−][src]
pub struct Instance<'tcx> {
pub def: InstanceDef<'tcx>,
pub substs: &'tcx List<GenericArg<'tcx>>,
}Expand description
A monomorphized InstanceDef.
Monomorphization happens on-the-fly and no monomorphized MIR is ever created. Instead, this type
simply couples a potentially generic InstanceDef with some substs, and codegen and const eval
will do all required substitution as they run.
Fields
def: InstanceDef<'tcx>substs: &'tcx List<GenericArg<'tcx>>Auto Trait Implementations
impl<'tcx> !RefUnwindSafe for Instance<'tcx>
impl<'tcx> !UnwindSafe for Instance<'tcx>
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn subst_spanned(
self,
tcx: TyCtxt<'tcx>,
substs: &[GenericArg<'tcx>],
span: Option<Span>
) -> T
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: 32 bytes