From e67c768110f2cd55d6823defcbfca5651fe1f9f5 Mon Sep 17 00:00:00 2001 From: oli Date: Mon, 2 Nov 2020 11:54:06 +0000 Subject: [PATCH] Move ZST constant to the top of the impl block --- compiler/rustc_middle/src/mir/interpret/value.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/rustc_middle/src/mir/interpret/value.rs b/compiler/rustc_middle/src/mir/interpret/value.rs index 2830b0e43f5..a191dd1d705 100644 --- a/compiler/rustc_middle/src/mir/interpret/value.rs +++ b/compiler/rustc_middle/src/mir/interpret/value.rs @@ -162,6 +162,8 @@ impl 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 @@ impl<'tcx, Tag> Scalar { Scalar::Int(ScalarInt::null(cx.data_layout().pointer_size)) } - pub const ZST: Self = Scalar::Int(ScalarInt::ZST); - #[inline(always)] fn ptr_op( self,