Skip to content

Commit

Permalink
Remove redundant delay_span_bug
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Jul 5, 2023
1 parent 9cacfae commit 66ae999
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1170,16 +1170,10 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
}

// Already reported in the query.
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;
}
SelectionError::NotConstEvaluatable(NotConstEvaluatable::Error(_)) |
// Already reported.
Overflow(OverflowError::Error(_)) => {
self.tcx.sess.delay_span_bug(span, "`OverflowError` has been reported");
return;
}
Overflow(OverflowError::Error(_)) => return,

Overflow(_) => {
bug!("overflow should be handled before the `report_selection_error` path");
}
Expand Down

0 comments on commit 66ae999

Please sign in to comment.