[−][src]Trait rustc_middle::ty::layout::PrimitiveExt

pub trait PrimitiveExt {
    pub fn to_ty<'tcx>(&self, tcx: TyCtxt<'tcx>) -> Ty<'tcx>;
pub fn to_int_ty<'tcx>(&self, tcx: TyCtxt<'tcx>) -> Ty<'tcx>; }

Required methods

pub fn to_ty<'tcx>(&self, tcx: TyCtxt<'tcx>) -> Ty<'tcx>[src]

pub fn to_int_ty<'tcx>(&self, tcx: TyCtxt<'tcx>) -> Ty<'tcx>[src]

Loading content...

Implementations on Foreign Types

impl PrimitiveExt for Primitive[src]

pub fn to_int_ty<'tcx>(&self, tcx: TyCtxt<'tcx>) -> Ty<'tcx>[src]

Return an integer type matching this primitive. Useful in particular when dealing with enum discriminants.

Loading content...

Implementors

Loading content...