]> git.lizzy.rs Git - rust.git/commitdiff
Fixup
authorOliver Schneider <github35764891676564198441@oli-obk.de>
Mon, 25 Jun 2018 16:48:11 +0000 (18:48 +0200)
committerOliver Schneider <github35764891676564198441@oli-obk.de>
Thu, 28 Jun 2018 09:02:31 +0000 (11:02 +0200)
src/librustc/mir/interpret/error.rs
src/librustc/mir/interpret/value.rs

index ab3fb0d2180ab84a6997370a1272f442eaeee7db..dca1c12b51df19a6303433c75c8341734f55b057 100644 (file)
 
 pub type ConstEvalResult<'tcx> = Result<&'tcx ty::Const<'tcx>, Lrc<ConstEvalErr<'tcx>>>;
 
+#[derive(Copy, Clone, Debug, Hash, RustcEncodable, RustcDecodable, Eq, PartialEq, Ord, PartialOrd)]
+pub enum ConstVal<'tcx> {
+    Unevaluated(DefId, &'tcx Substs<'tcx>),
+    Value(ConstValue<'tcx>),
+}
+
 #[derive(Clone, Debug, RustcEncodable, RustcDecodable)]
 pub struct ConstEvalErr<'tcx> {
     pub span: Span,
index b17b774101769d60cbbf9f99b2daa3f2cbd92072..9e3d4e60603ec8f6173dd8b8e9a6e3db7ff26b29 100644 (file)
@@ -5,18 +5,10 @@
 
 use super::{EvalResult, Pointer, PointerArithmetic, Allocation};
 
-#[derive(Copy, Clone, Debug, Hash, RustcEncodable, RustcDecodable, Eq, PartialEq, Ord, PartialOrd)]
-pub enum ConstVal<'tcx> {
-    Value(ConstValue<'tcx>),
-}
-
 /// Represents a constant value in Rust. ByVal and ScalarPair are optimizations which
 /// matches Value's optimizations for easy conversions between these two types
 #[derive(Clone, Copy, Debug, Eq, PartialEq, PartialOrd, Ord, RustcEncodable, RustcDecodable, Hash)]
 pub enum ConstValue<'tcx> {
-    /// Never returned from the `const_eval` query, but the HIR contains these frequently in order
-    /// to allow HIR creation to happen for everything before needing 
-    Unevaluated(DefId, &'tcx Substs<'tcx>),
     /// Used only for types with layout::abi::Scalar ABI and ZSTs which use Scalar::undef()
     Scalar(Scalar),
     /// Used only for types with layout::abi::ScalarPair