Turn a bug!() into a span_delay_bug()

No reason why this needs to be a `bug!()`.
This commit is contained in:
León Orell Valerian Liehr 2024-01-02 01:11:21 +01:00
parent ba860344e1
commit 8f546aa495
No known key found for this signature in database
GPG Key ID: D17A07215F68E713

View File

@ -315,7 +315,10 @@ pub(super) fn generics_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::Generics {
if is_host_effect {
if let Some(idx) = host_effect_index {
bug!("parent also has host effect param? index: {idx}, def: {def_id:?}");
tcx.dcx().span_delayed_bug(
param.span,
format!("parent also has host effect param? index: {idx}, def: {def_id:?}"),
);
}
host_effect_index = Some(index as usize);