Skip to content

Commit 221a499

Browse files
committed
Fixup
1 parent 0599477 commit 221a499

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

src/librustc/mir/interpret/error.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ use syntax::ast;
2424

2525
pub type ConstEvalResult<'tcx> = Result<&'tcx ty::Const<'tcx>, Lrc<ConstEvalErr<'tcx>>>;
2626

27+
#[derive(Copy, Clone, Debug, Hash, RustcEncodable, RustcDecodable, Eq, PartialEq, Ord, PartialOrd)]
28+
pub enum ConstVal<'tcx> {
29+
Unevaluated(DefId, &'tcx Substs<'tcx>),
30+
Value(ConstValue<'tcx>),
31+
}
32+
2733
#[derive(Clone, Debug, RustcEncodable, RustcDecodable)]
2834
pub struct ConstEvalErr<'tcx> {
2935
pub span: Span,

src/librustc/mir/interpret/value.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,10 @@ use ty;
55

66
use super::{EvalResult, Pointer, PointerArithmetic, Allocation};
77

8-
#[derive(Copy, Clone, Debug, Hash, RustcEncodable, RustcDecodable, Eq, PartialEq, Ord, PartialOrd)]
9-
pub enum ConstVal<'tcx> {
10-
Value(ConstValue<'tcx>),
11-
}
12-
138
/// Represents a constant value in Rust. ByVal and ScalarPair are optimizations which
149
/// matches Value's optimizations for easy conversions between these two types
1510
#[derive(Clone, Copy, Debug, Eq, PartialEq, PartialOrd, Ord, RustcEncodable, RustcDecodable, Hash)]
1611
pub enum ConstValue<'tcx> {
17-
/// Never returned from the `const_eval` query, but the HIR contains these frequently in order
18-
/// to allow HIR creation to happen for everything before needing
19-
Unevaluated(DefId, &'tcx Substs<'tcx>),
2012
/// Used only for types with layout::abi::Scalar ABI and ZSTs which use Scalar::undef()
2113
Scalar(Scalar),
2214
/// Used only for types with layout::abi::ScalarPair

0 commit comments

Comments
 (0)