Rename HandlerInner::delay_span_bug as HandlerInner::span_delayed_bug.

Because the corresponding `Level` is `DelayedBug` and `span_delayed_bug`
follows the pattern used everywhere else: `span_err`, `span_warning`,
etc.
This commit is contained in:
Nicholas Nethercote
2023-11-30 15:01:11 +11:00
parent 57d6f840b9
commit 5d1d384443
131 changed files with 309 additions and 278 deletions

View File

@@ -38,16 +38,16 @@ fn opt_span_bug_fmt<S: Into<MultiSpan>>(
})
}
/// A query to trigger a `delay_span_bug`. Clearly, if one has a `tcx` one can already trigger a
/// `delay_span_bug`, so what is the point of this? It exists to help us test `delay_span_bug`'s
/// A query to trigger a `span_delayed_bug`. Clearly, if one has a `tcx` one can already trigger a
/// `span_delayed_bug`, so what is the point of this? It exists to help us test `span_delayed_bug`'s
/// interactions with the query system and incremental.
pub fn trigger_delay_span_bug(tcx: TyCtxt<'_>, key: rustc_hir::def_id::DefId) {
tcx.sess.delay_span_bug(
pub fn trigger_span_delayed_bug(tcx: TyCtxt<'_>, key: rustc_hir::def_id::DefId) {
tcx.sess.span_delayed_bug(
tcx.def_span(key),
"delayed span bug triggered by #[rustc_error(delay_span_bug_from_inside_query)]",
"delayed span bug triggered by #[rustc_error(span_delayed_bug_from_inside_query)]",
);
}
pub fn provide(providers: &mut crate::query::Providers) {
*providers = crate::query::Providers { trigger_delay_span_bug, ..*providers };
*providers = crate::query::Providers { trigger_span_delayed_bug, ..*providers };
}