Skip to content

Commit 046482e

Browse files
committed
rustc: future-proof error reporting for polymorphic constants in types.
1 parent ff6422d commit 046482e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/librustc/traits/error_reporting.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,11 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
846846
"could not evaluate constant expression",
847847
) {
848848
Some(err) => err,
849-
None => return,
849+
None => {
850+
self.tcx.sess.delay_span_bug(span,
851+
&format!("constant in type had an ignored error: {:?}", err));
852+
return;
853+
}
850854
}
851855
}
852856

0 commit comments

Comments
 (0)