Auto merge of #118470 - nnethercote:cleanup-error-handlers, r=compiler-errors
Cleanup error handlers Mostly by making function naming more consistent. More to do after this, but this is enough for one PR. r? compiler-errors
This commit is contained in:
commit
2da59b8676
170 changed files with 495 additions and 517 deletions
|
@ -2130,11 +2130,11 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
|
|||
&& !self.has_buffered_errors()
|
||||
{
|
||||
// rust-lang/rust#46908: In pure NLL mode this code path should be
|
||||
// unreachable, but we use `delay_span_bug` because we can hit this when
|
||||
// unreachable, but we use `span_delayed_bug` because we can hit this when
|
||||
// dereferencing a non-Copy raw pointer *and* have `-Ztreat-err-as-bug`
|
||||
// enabled. We don't want to ICE for that case, as other errors will have
|
||||
// been emitted (#52262).
|
||||
self.infcx.tcx.sess.delay_span_bug(
|
||||
self.infcx.tcx.sess.span_delayed_bug(
|
||||
span,
|
||||
format!(
|
||||
"Accessing `{place:?}` with the kind `{kind:?}` shouldn't be possible",
|
||||
|
@ -2428,7 +2428,7 @@ mod error {
|
|||
|
||||
pub fn buffer_error(&mut self, t: DiagnosticBuilder<'_, ErrorGuaranteed>) {
|
||||
if let None = self.tainted_by_errors {
|
||||
self.tainted_by_errors = Some(self.tcx.sess.delay_span_bug(
|
||||
self.tainted_by_errors = Some(self.tcx.sess.span_delayed_bug(
|
||||
t.span.clone_ignoring_labels(),
|
||||
"diagnostic buffered but not emitted",
|
||||
))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue