1
Fork 0

Add DiagCtxt::delayed_bug.

We have `span_delayed_bug` and often pass it a `DUMMY_SP`. This commit
adds `delayed_bug`, which matches pairs like `err`/`span_err` and
`warn`/`span_warn`.
This commit is contained in:
Nicholas Nethercote 2024-01-04 12:54:23 +11:00
parent 3c4f1d85af
commit 2ea7a37e11
27 changed files with 103 additions and 146 deletions

View file

@ -284,7 +284,7 @@ impl<'tcx> LayoutCalculator for LayoutCx<'tcx, TyCtxt<'tcx>> {
type TargetDataLayoutRef = &'tcx TargetDataLayout;
fn delayed_bug(&self, txt: String) {
self.tcx.dcx().span_delayed_bug(DUMMY_SP, txt);
self.tcx.dcx().delayed_bug(txt);
}
fn current_data_layout(&self) -> Self::TargetDataLayoutRef {