about summary refs log tree commit diff
path: root/src/librustc_const_eval
diff options
context:
space:
mode:
authorEduard-Mihai Burtescu <edy.burt@gmail.com>2017-02-19 14:46:29 +0200
committerEduard-Mihai Burtescu <edy.burt@gmail.com>2017-02-25 18:35:26 +0200
commitc832e6f3272fd01e22a6370e7745e305fe13a4c9 (patch)
treec26d1acd868b805dbddb49259a70ff1e2b9d3548 /src/librustc_const_eval
parent9890e0466d951d1b0020ae38e2a4c0d8c43cfea1 (diff)
rustc_typeck: rework coherence to be almost completely on-demand.
Diffstat (limited to 'src/librustc_const_eval')
-rw-r--r--src/librustc_const_eval/check_match.rs2
-rw-r--r--src/librustc_const_eval/eval.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_const_eval/check_match.rs b/src/librustc_const_eval/check_match.rs
index 9b30946c0be..db5df72267d 100644
--- a/src/librustc_const_eval/check_match.rs
+++ b/src/librustc_const_eval/check_match.rs
@@ -516,7 +516,7 @@ fn check_legality_of_move_bindings(cx: &MatchVisitor,
 ///
 /// FIXME: this should be done by borrowck.
 fn check_for_mutation_in_guard(cx: &MatchVisitor, guard: &hir::Expr) {
-    cx.tcx.infer_ctxt((cx.tables, cx.param_env.clone()), Reveal::NotSpecializable).enter(|infcx| {
+    cx.tcx.infer_ctxt((cx.tables, cx.param_env.clone()), Reveal::UserFacing).enter(|infcx| {
         let mut checker = MutationChecker {
             cx: cx,
         };
diff --git a/src/librustc_const_eval/eval.rs b/src/librustc_const_eval/eval.rs
index eadb49a0731..0ab2255aab0 100644
--- a/src/librustc_const_eval/eval.rs
+++ b/src/librustc_const_eval/eval.rs
@@ -922,7 +922,7 @@ fn resolve_trait_associated_const<'a, 'tcx: 'a>(
            trait_ref);
 
     tcx.populate_implementations_for_trait_if_necessary(trait_id);
-    tcx.infer_ctxt((), Reveal::NotSpecializable).enter(|infcx| {
+    tcx.infer_ctxt((), Reveal::UserFacing).enter(|infcx| {
         let mut selcx = traits::SelectionContext::new(&infcx);
         let obligation = traits::Obligation::new(traits::ObligationCause::dummy(),
                                                  trait_ref.to_poly_trait_predicate());