Skip to content

Commit 484cacc

Browse files
committed
Turn a bug!() into a span_delay_bug()
No reason why this needs to be a `bug!()`.
1 parent 0e333c6 commit 484cacc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

compiler/rustc_hir_analysis/src/collect/generics_of.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,10 @@ pub(super) fn generics_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::Generics {
315315

316316
if is_host_effect {
317317
if let Some(idx) = host_effect_index {
318-
bug!("parent also has host effect param? index: {idx}, def: {def_id:?}");
318+
tcx.dcx().span_delayed_bug(
319+
param.span,
320+
format!("parent also has host effect param? index: {idx}, def: {def_id:?}"),
321+
);
319322
}
320323

321324
host_effect_index = Some(index as usize);

0 commit comments

Comments
 (0)