}
}
+ #[inline]
+ pub fn with_tag(self, new_tag: Tag) -> Self {
+ match self {
+ Scalar::Ptr(ptr) => Scalar::Ptr(Pointer { tag: new_tag, ..ptr }),
+ Scalar::Bits { bits, size } => Scalar::Bits { bits, size },
+ }
+ }
+
#[inline]
pub fn ptr_null(cx: &impl HasDataLayout) -> Self {
Scalar::Bits {
}
}
+ #[inline]
+ pub fn with_tag(self, new_tag: Tag) -> Self
+ {
+ MemPlace {
+ ptr: self.ptr.with_tag(new_tag),
+ align: self.align,
+ meta: self.meta,
+ }
+ }
+
#[inline(always)]
pub fn from_scalar_ptr(ptr: Scalar<Tag>, align: Align) -> Self {
MemPlace {
}
}
+ #[inline]
+ pub fn with_tag(self, new_tag: Tag) -> Self
+ {
+ MPlaceTy {
+ mplace: self.mplace.with_tag(new_tag),
+ layout: self.layout,
+ }
+ }
+
+ #[inline]
pub fn offset(
self,
offset: Size,