Skip to content

Commit eb0afe1

Browse files
committed
Add more information in ConstEvalFailure error
1 parent 0bfbaa6 commit eb0afe1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/librustc/traits/error_reporting.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -914,8 +914,11 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
914914
}
915915

916916
// already reported in the query
917-
ConstEvalFailure(_) => {
918-
self.tcx.sess.delay_span_bug(span, "constant in type had an ignored error");
917+
ConstEvalFailure(err) => {
918+
self.tcx.sess.delay_span_bug(
919+
span,
920+
&format!("constant in type had an ignored error: {:?}", err),
921+
);
919922
return;
920923
}
921924

0 commit comments

Comments
 (0)