Struct rustc_const_eval::interpret::operand::ImmTy
source · pub struct ImmTy<'tcx, Prov: Provenance = AllocId> {
imm: Immediate<Prov>,
pub layout: TyAndLayout<'tcx>,
}
Fields§
§imm: Immediate<Prov>
§layout: TyAndLayout<'tcx>
Implementations§
source§impl<'tcx, Prov: Provenance> ImmTy<'tcx, Prov>
impl<'tcx, Prov: Provenance> ImmTy<'tcx, Prov>
pub fn from_scalar(val: Scalar<Prov>, layout: TyAndLayout<'tcx>) -> Self
pub fn from_immediate(imm: Immediate<Prov>, layout: TyAndLayout<'tcx>) -> Self
pub fn uninit(layout: TyAndLayout<'tcx>) -> Self
pub fn try_from_uint(
i: impl Into<u128>,
layout: TyAndLayout<'tcx>
) -> Option<Self>
pub fn from_uint(i: impl Into<u128>, layout: TyAndLayout<'tcx>) -> Self
pub fn try_from_int(
i: impl Into<i128>,
layout: TyAndLayout<'tcx>
) -> Option<Self>
pub fn from_int(i: impl Into<i128>, layout: TyAndLayout<'tcx>) -> Self
pub fn to_const_int(self) -> ConstInt
Trait Implementations§
source§impl<'tcx, Prov: Provenance> Deref for ImmTy<'tcx, Prov>
impl<'tcx, Prov: Provenance> Deref for ImmTy<'tcx, Prov>
source§impl<Prov: Provenance> Display for ImmTy<'_, Prov>
impl<Prov: Provenance> Display for ImmTy<'_, Prov>
Auto Trait Implementations§
impl<'tcx, Prov = AllocId> !RefUnwindSafe for ImmTy<'tcx, Prov>
impl<'tcx, Prov = AllocId> !Send for ImmTy<'tcx, Prov>
impl<'tcx, Prov = AllocId> !Sync for ImmTy<'tcx, Prov>
impl<'tcx, Prov> Unpin for ImmTy<'tcx, Prov>where
Prov: Unpin,
impl<'tcx, Prov = AllocId> !UnwindSafe for ImmTy<'tcx, Prov>
Blanket Implementations§
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.