From d2f363ba89f41f3abb1e85d44eaae93ea338d3a4 Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Wed, 31 Jan 2018 09:57:25 +0100 Subject: [PATCH] Report all errors other than those about insufficient type information --- src/librustc_mir/transform/const_prop.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/librustc_mir/transform/const_prop.rs b/src/librustc_mir/transform/const_prop.rs index d3ab494139a..9dee1e1633e 100644 --- a/src/librustc_mir/transform/const_prop.rs +++ b/src/librustc_mir/transform/const_prop.rs @@ -80,8 +80,10 @@ impl<'b, 'a, 'tcx:'b> ConstPropagator<'b, 'a, 'tcx> { fn const_eval(&self, cid: GlobalId<'tcx>, span: Span) -> Option> { let value = match self.tcx.const_eval(self.param_env.and(cid)) { Ok(val) => val, - // FIXME: report some errors - Err(_) => return None, + Err(err) => { + err.report(self.tcx, span, "const prop"); + return None; + }, }; let val = match value.val { ConstVal::Value(v) => v,