rustc: future-proof error reporting for polymorphic constants in types.

This commit is contained in:
Eduard-Mihai Burtescu 2018-09-19 11:07:43 +03:00
parent ff6422d7a3
commit 046482e95e

View file

@ -846,7 +846,11 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
"could not evaluate constant expression",
) {
Some(err) => err,
None => return,
None => {
self.tcx.sess.delay_span_bug(span,
&format!("constant in type had an ignored error: {:?}", err));
return;
}
}
}