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-04-19 15:15:12 +0300
committerEduard-Mihai Burtescu <edy.burt@gmail.com>2017-04-23 11:11:56 +0300
commit0ff828baa06504c91e38dfda53ead61cc44ad171 (patch)
treeb394cd045984e3204614704a55b6cb97423dc1fe /src/librustc_const_eval
parente22873d91206e11349da713017bd67d43d8d535d (diff)
rustc_const_eval: CallOn isn't needed, typeck/const-qualif handle those cases.
Diffstat (limited to 'src/librustc_const_eval')
-rw-r--r--src/librustc_const_eval/eval.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_const_eval/eval.rs b/src/librustc_const_eval/eval.rs
index 37395ca7871..5c421df92c7 100644
--- a/src/librustc_const_eval/eval.rs
+++ b/src/librustc_const_eval/eval.rs
@@ -354,7 +354,7 @@ fn eval_const_expr_partial<'a, 'tcx>(cx: &ConstContext<'a, 'tcx>,
       hir::ExprCall(ref callee, ref args) => {
           let (def_id, substs) = match cx.eval(callee)? {
               Function(def_id, substs) => (def_id, substs),
-              callee => signal!(e, CallOn(callee)),
+              _ => signal!(e, TypeckError),
           };
 
           let body = if let Some(node_id) = tcx.hir.as_local_node_id(def_id) {