diff --git a/compiler/rustc_middle/src/mir/interpret/value.rs b/compiler/rustc_middle/src/mir/interpret/value.rs index 2830b0e43f50..a191dd1d705f 100644 --- a/compiler/rustc_middle/src/mir/interpret/value.rs +++ b/compiler/rustc_middle/src/mir/interpret/value.rs @@ -162,6 +162,8 @@ pub fn with_tag(self, new_tag: Tag) -> Scalar { } impl<'tcx, Tag> Scalar { + pub const ZST: Self = Scalar::Int(ScalarInt::ZST); + /// Erase the tag from the scalar, if any. /// /// Used by error reporting code to avoid having the error type depend on `Tag`. @@ -178,8 +180,6 @@ pub fn null_ptr(cx: &impl HasDataLayout) -> Self { Scalar::Int(ScalarInt::null(cx.data_layout().pointer_size)) } - pub const ZST: Self = Scalar::Int(ScalarInt::ZST); - #[inline(always)] fn ptr_op( self,