Convert bugs back to delayed_bugs.

This commit undoes some of the previous commit's mechanical changes,
based on human judgment.
This commit is contained in:
Nicholas Nethercote 2024-02-20 09:36:28 +11:00
parent 010f3944e0
commit 2903bbbc15
24 changed files with 87 additions and 42 deletions

View file

@ -647,9 +647,7 @@ pub fn compute_inherent_assoc_ty_args<'a, 'b, 'tcx>(
Err(_) => {
tcx.dcx().span_bug(
cause.span,
format!(
"{self_ty:?} was a subtype of {impl_ty:?} during selection but now it is not"
),
format!("{self_ty:?} was equal to {impl_ty:?} during selection but now it is not"),
);
}
}
@ -1190,10 +1188,11 @@ fn assemble_candidates_from_impls<'cx, 'tcx>(
ImplSource::Builtin(BuiltinImplSource::TraitUpcasting { .. }, _)
| ImplSource::Builtin(BuiltinImplSource::TupleUnsizing, _) => {
// These traits have no associated types.
selcx.tcx().dcx().span_bug(
selcx.tcx().dcx().span_delayed_bug(
obligation.cause.span,
format!("Cannot project an associated type from `{impl_source:?}`"),
);
return Err(())
}
};