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
No known key found for this signature in database
GPG key ID: A69F8D225B3AD7D9

View file

@ -80,8 +80,10 @@ impl<'b, 'a, 'tcx:'b> ConstPropagator<'b, 'a, 'tcx> {
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,