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:
parent
a64efc72d0
commit
8bb574fdd3
4 changed files with 13 additions and 24 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue