1
Fork 0

implement new effects desugaring

This commit is contained in:
Deadbeef 2024-06-14 12:16:15 +00:00
parent 99f77a2eda
commit 72e8244e64
50 changed files with 636 additions and 228 deletions

View file

@ -4995,6 +4995,12 @@ fn point_at_assoc_type_restriction<G: EmissionGuarantee>(
let ty::ClauseKind::Projection(proj) = clause else {
return;
};
// avoid ICEing since effects desugared associated types don't have names.
// this path should only be hit for `~const` on invalid places, so they
// will have an informative error already.
if tcx.is_effects_desugared_assoc_ty(proj.projection_term.def_id) {
return;
}
let name = tcx.item_name(proj.projection_term.def_id);
let mut predicates = generics.predicates.iter().peekable();
let mut prev: Option<&hir::WhereBoundPredicate<'_>> = None;