Remove redundant delay_span_bug

This commit is contained in:
Oli Scherer 2023-07-04 08:58:09 +00:00
parent 9cacfae3e9
commit 66ae9998d5

View File

@ -1170,16 +1170,10 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
} }
// Already reported in the query. // Already reported in the query.
SelectionError::NotConstEvaluatable(NotConstEvaluatable::Error(_)) => { SelectionError::NotConstEvaluatable(NotConstEvaluatable::Error(_)) |
// FIXME(eddyb) remove this once `ErrorGuaranteed` becomes a proof token.
self.tcx.sess.delay_span_bug(span, "`ErrorGuaranteed` without an error");
return;
}
// Already reported. // Already reported.
Overflow(OverflowError::Error(_)) => { Overflow(OverflowError::Error(_)) => return,
self.tcx.sess.delay_span_bug(span, "`OverflowError` has been reported");
return;
}
Overflow(_) => { Overflow(_) => {
bug!("overflow should be handled before the `report_selection_error` path"); bug!("overflow should be handled before the `report_selection_error` path");
} }