@@ -1560,7 +1560,7 @@ pub struct SourceScopeLocalData {
1560
1560
/// &'static str`.
1561
1561
#[ derive( Clone , Debug , TyEncodable , TyDecodable , HashStable , TypeFoldable , TypeVisitable ) ]
1562
1562
pub struct UserTypeProjections {
1563
- pub contents : Vec < ( UserTypeProjection , Span ) > ,
1563
+ pub contents : Vec < UserTypeProjection > ,
1564
1564
}
1565
1565
1566
1566
impl < ' tcx > UserTypeProjections {
@@ -1572,26 +1572,17 @@ impl<'tcx> UserTypeProjections {
1572
1572
self . contents . is_empty ( )
1573
1573
}
1574
1574
1575
- pub fn projections_and_spans (
1576
- & self ,
1577
- ) -> impl Iterator < Item = & ( UserTypeProjection , Span ) > + ExactSizeIterator {
1578
- self . contents . iter ( )
1579
- }
1580
-
1581
1575
pub fn projections ( & self ) -> impl Iterator < Item = & UserTypeProjection > + ExactSizeIterator {
1582
- self . contents . iter ( ) . map ( | & ( ref user_type , _span ) | user_type )
1576
+ self . contents . iter ( )
1583
1577
}
1584
1578
1585
- pub fn push_user_type ( mut self , base_user_ty : UserTypeAnnotationIndex , span : Span ) -> Self {
1586
- self . contents . push ( ( UserTypeProjection { base : base_user_ty , projs : vec ! [ ] } , span ) ) ;
1579
+ pub fn push_user_type ( mut self , base_user_type : UserTypeAnnotationIndex ) -> Self {
1580
+ self . contents . push ( UserTypeProjection { base : base_user_type , projs : vec ! [ ] } ) ;
1587
1581
self
1588
1582
}
1589
1583
1590
- fn map_projections (
1591
- mut self ,
1592
- mut f : impl FnMut ( UserTypeProjection ) -> UserTypeProjection ,
1593
- ) -> Self {
1594
- self . contents = self . contents . into_iter ( ) . map ( |( proj, span) | ( f ( proj) , span) ) . collect ( ) ;
1584
+ fn map_projections ( mut self , f : impl FnMut ( UserTypeProjection ) -> UserTypeProjection ) -> Self {
1585
+ self . contents = self . contents . into_iter ( ) . map ( f) . collect ( ) ;
1595
1586
self
1596
1587
}
1597
1588
0 commit comments