Skip to content

Commit

Permalink
rustc: future-proof error reporting for polymorphic constants in types.
Browse files Browse the repository at this point in the history
  • Loading branch information
eddyb committed Sep 19, 2018
1 parent ff6422d commit 046482e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/librustc/traits/error_reporting.rs
Expand Up @@ -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;
}
}
}

Expand Down

0 comments on commit 046482e

Please sign in to comment.