about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorOliver Schneider <github35764891676564198441@oli-obk.de>2018-06-25 18:48:11 +0200
committerOliver Schneider <github35764891676564198441@oli-obk.de>2018-06-28 11:02:31 +0200
commit221a499bf111c02f0d2cffa3ffa520d842d1877d (patch)
treed564bca78620075066995f4b2311f18315fffb10 /src
parent05994779ea953bdbd7fb015e1afffdd91203a1e8 (diff)
downloadrust-221a499bf111c02f0d2cffa3ffa520d842d1877d.tar.gz
rust-221a499bf111c02f0d2cffa3ffa520d842d1877d.zip
Fixup
Diffstat (limited to 'src')
-rw-r--r--src/librustc/mir/interpret/error.rs6
-rw-r--r--src/librustc/mir/interpret/value.rs8
2 files changed, 6 insertions, 8 deletions
diff --git a/src/librustc/mir/interpret/error.rs b/src/librustc/mir/interpret/error.rs
index ab3fb0d2180..dca1c12b51d 100644
--- a/src/librustc/mir/interpret/error.rs
+++ b/src/librustc/mir/interpret/error.rs
@@ -24,6 +24,12 @@ use syntax::ast;
 
 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,
diff --git a/src/librustc/mir/interpret/value.rs b/src/librustc/mir/interpret/value.rs
index b17b7741017..9e3d4e60603 100644
--- a/src/librustc/mir/interpret/value.rs
+++ b/src/librustc/mir/interpret/value.rs
@@ -5,18 +5,10 @@ use ty;
 
 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