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

Required Methods

Implementations on Foreign Types

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

Implementors