1
Fork 0

Don't store a redundant span in user-type projections

This span is already present in the corresponding
`CanonicalUserTypeAnnotation`, and can be retrieved via the annotation's ID.
This commit is contained in:
Zalathar 2025-02-16 21:10:04 +11:00
parent a64efc72d0
commit 8bb574fdd3
4 changed files with 13 additions and 24 deletions

View file

@ -927,8 +927,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
// of `user_ty` on any bindings contained with subpattern.
let base_user_ty = self.canonical_user_type_annotations.push(annotation.clone());
let subpattern_user_ty =
pattern_user_ty.push_user_type(base_user_ty, annotation.span);
let subpattern_user_ty = pattern_user_ty.push_user_type(base_user_ty);
self.visit_primary_bindings(subpattern, subpattern_user_ty, f)
}