about summary refs log tree commit diff
diff options
context:
space:
mode:
authoroli <github35764891676564198441@oli-obk.de>2020-11-02 11:54:06 +0000
committeroli <github35764891676564198441@oli-obk.de>2020-11-04 10:15:54 +0000
commite67c768110f2cd55d6823defcbfca5651fe1f9f5 (patch)
treee915aa318bf1dea88f6e9c6f73419176409d7faa
parentcb1cf6ae959f9b494a3d109dd84ebb49650da010 (diff)
downloadrust-e67c768110f2cd55d6823defcbfca5651fe1f9f5.tar.gz
rust-e67c768110f2cd55d6823defcbfca5651fe1f9f5.zip
Move ZST constant to the top of the impl block
-rw-r--r--compiler/rustc_middle/src/mir/interpret/value.rs4
1 files 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<Tag> {
+    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<Tag> {
         Scalar::Int(ScalarInt::null(cx.data_layout().pointer_size))
     }
 
-    pub const ZST: Self = Scalar::Int(ScalarInt::ZST);
-
     #[inline(always)]
     fn ptr_op(
         self,