Report all errors other than those about insufficient type information

This commit is contained in:
Oliver Schneider
2018-01-31 09:57:25 +01:00
parent 64fbf5d5ad
commit d2f363ba89
+4 -2
View File
@@ -80,8 +80,10 @@ fn new(
fn const_eval(&self, cid: GlobalId<'tcx>, span: Span) -> Option<Const<'tcx>> {
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,