Skip to content

Commit e67c768

Browse files
committed
Move ZST constant to the top of the impl block
1 parent cb1cf6a commit e67c768

File tree

1 file changed

+2
-2
lines changed
  • compiler/rustc_middle/src/mir/interpret

1 file changed

+2
-2
lines changed

compiler/rustc_middle/src/mir/interpret/value.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,8 @@ impl Scalar<()> {
162162
}
163163

164164
impl<'tcx, Tag> Scalar<Tag> {
165+
pub const ZST: Self = Scalar::Int(ScalarInt::ZST);
166+
165167
/// Erase the tag from the scalar, if any.
166168
///
167169
/// Used by error reporting code to avoid having the error type depend on `Tag`.
@@ -178,8 +180,6 @@ impl<'tcx, Tag> Scalar<Tag> {
178180
Scalar::Int(ScalarInt::null(cx.data_layout().pointer_size))
179181
}
180182

181-
pub const ZST: Self = Scalar::Int(ScalarInt::ZST);
182-
183183
#[inline(always)]
184184
fn ptr_op(
185185
self,

0 commit comments

Comments
 (0)