Enum rustc_typeck::ty::UserType [−][src]
pub enum UserType<'tcx> {
Ty(&'tcx TyS<'tcx>),
TypeOf(DefId, UserSubsts<'tcx>),
}Expand description
A user-given type annotation attached to a constant. These arise
from constants that are named via paths, like Foo::<A>::new and
so forth.
Variants
Ty(&'tcx TyS<'tcx>)
Tuple Fields
0: &'tcx TyS<'tcx>TypeOf(DefId, UserSubsts<'tcx>)
The canonical type is the result of type_of(def_id) with the
given substitutions applied.
Auto Trait Implementations
impl<'tcx> !RefUnwindSafe for UserType<'tcx>
impl<'tcx> !UnwindSafe for UserType<'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: 40 bytes
Size for each variant:
Ty: 12 bytesTypeOf: 36 bytes