about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>2016-04-26 14:11:14 +0200
committerOliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>2016-04-26 14:11:14 +0200
commit9d7ed99c06bbce263c4de56e269b62b135c5a6e1 (patch)
tree4a9df97617d8f61b0a59c0ecc566cf31f2980444
parent89d1046503b2721e7a372f24eb7ef5998d9dd176 (diff)
downloadrust-9d7ed99c06bbce263c4de56e269b62b135c5a6e1.tar.gz
rust-9d7ed99c06bbce263c4de56e269b62b135c5a6e1.zip
skip non-const-path errors for now
Associated constants aren't implemented fully in early const eval
-rw-r--r--src/librustc_passes/consts.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/librustc_passes/consts.rs b/src/librustc_passes/consts.rs
index 0673188f53d..9b71445270a 100644
--- a/src/librustc_passes/consts.rs
+++ b/src/librustc_passes/consts.rs
@@ -28,8 +28,9 @@ use rustc::dep_graph::DepNode;
 use rustc::ty::cast::{CastKind};
 use rustc_const_eval::{ConstEvalErr, lookup_const_fn_by_id, compare_lit_exprs};
 use rustc_const_eval::{eval_const_expr_partial, lookup_const_by_id};
-use rustc_const_eval::ErrKind::{ErroneousReferencedConstant, MiscBinaryOp};
 use rustc_const_eval::ErrKind::{IndexOpFeatureGated, UnimplementedConstVal, MiscCatchAll, Math};
+use rustc_const_eval::ErrKind::{ErroneousReferencedConstant, MiscBinaryOp, NonConstPath};
+use rustc_const_eval::ErrKind::UnresolvedPath;
 use rustc_const_eval::EvalHint::ExprTypeChecked;
 use rustc_const_math::{ConstMathErr, Op};
 use rustc::hir::def::Def;
@@ -490,6 +491,8 @@ impl<'a, 'tcx, 'v> Visitor<'v> for CheckCrateVisitor<'a, 'tcx> {
                 Err(ConstEvalErr { kind: UnimplementedConstVal(_), ..}) |
                 Err(ConstEvalErr { kind: MiscCatchAll, ..}) |
                 Err(ConstEvalErr { kind: MiscBinaryOp, ..}) |
+                Err(ConstEvalErr { kind: NonConstPath, ..}) |
+                Err(ConstEvalErr { kind: UnresolvedPath, ..}) |
                 Err(ConstEvalErr { kind: ErroneousReferencedConstant(_), ..}) |
                 Err(ConstEvalErr { kind: Math(ConstMathErr::Overflow(Op::Shr)), ..}) |
                 Err(ConstEvalErr { kind: Math(ConstMathErr::Overflow(Op::Shl)), ..}) |