@@ -300,14 +300,14 @@ pub struct PeekMut<
300
300
}
301
301
302
302
#[ stable( feature = "collection_debug" , since = "1.17.0" ) ]
303
- impl < ' a , T : Ord + fmt:: Debug , A : Allocator + ' a > fmt:: Debug for PeekMut < ' a , T , A > {
303
+ impl < T : Ord + fmt:: Debug , A : Allocator > fmt:: Debug for PeekMut < ' _ , T , A > {
304
304
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
305
305
f. debug_tuple ( "PeekMut" ) . field ( & self . heap . data [ 0 ] ) . finish ( )
306
306
}
307
307
}
308
308
309
309
#[ stable( feature = "binary_heap_peek_mut" , since = "1.12.0" ) ]
310
- impl < ' a , T : Ord , A : Allocator + ' a > Drop for PeekMut < ' a , T , A > {
310
+ impl < T : Ord , A : Allocator > Drop for PeekMut < ' _ , T , A > {
311
311
fn drop ( & mut self ) {
312
312
if let Some ( original_len) = self . original_len {
313
313
// SAFETY: That's how many elements were in the Vec at the time of
@@ -324,7 +324,7 @@ impl<'a, T: Ord, A: Allocator + 'a> Drop for PeekMut<'a, T, A> {
324
324
}
325
325
326
326
#[ stable( feature = "binary_heap_peek_mut" , since = "1.12.0" ) ]
327
- impl < ' a , T : Ord , A : Allocator + ' a > Deref for PeekMut < ' a , T , A > {
327
+ impl < T : Ord , A : Allocator > Deref for PeekMut < ' _ , T , A > {
328
328
type Target = T ;
329
329
fn deref ( & self ) -> & T {
330
330
debug_assert ! ( !self . heap. is_empty( ) ) ;
@@ -334,7 +334,7 @@ impl<'a, T: Ord, A: Allocator + 'a> Deref for PeekMut<'a, T, A> {
334
334
}
335
335
336
336
#[ stable( feature = "binary_heap_peek_mut" , since = "1.12.0" ) ]
337
- impl < ' a , T : Ord , A : Allocator + ' a > DerefMut for PeekMut < ' a , T , A > {
337
+ impl < T : Ord , A : Allocator > DerefMut for PeekMut < ' _ , T , A > {
338
338
fn deref_mut ( & mut self ) -> & mut T {
339
339
debug_assert ! ( !self . heap. is_empty( ) ) ;
340
340
@@ -362,7 +362,7 @@ impl<'a, T: Ord, A: Allocator + 'a> DerefMut for PeekMut<'a, T, A> {
362
362
}
363
363
}
364
364
365
- impl < ' a , T : Ord , A : Allocator + ' a > PeekMut < ' a , T , A > {
365
+ impl < ' a , T : Ord , A : Allocator > PeekMut < ' a , T , A > {
366
366
/// Removes the peeked value from the heap and returns it.
367
367
#[ stable( feature = "binary_heap_peek_mut_pop" , since = "1.18.0" ) ]
368
368
pub fn pop ( mut this : PeekMut < ' a , T , A > ) -> T {
@@ -415,7 +415,7 @@ struct RebuildOnDrop<
415
415
rebuild_from : usize ,
416
416
}
417
417
418
- impl < ' a , T : Ord , A : Allocator > Drop for RebuildOnDrop < ' a , T , A > {
418
+ impl < T : Ord , A : Allocator > Drop for RebuildOnDrop < ' _ , T , A > {
419
419
fn drop ( & mut self ) {
420
420
self . heap . rebuild_tail ( self . rebuild_from ) ;
421
421
}
@@ -1617,13 +1617,13 @@ unsafe impl<T: Ord, A: Allocator> TrustedLen for IntoIterSorted<T, A> {}
1617
1617
pub struct Drain <
1618
1618
' a ,
1619
1619
T : ' a ,
1620
- #[ unstable( feature = "allocator_api" , issue = "32838" ) ] A : Allocator + ' a = Global ,
1620
+ #[ unstable( feature = "allocator_api" , issue = "32838" ) ] A : Allocator = Global ,
1621
1621
> {
1622
1622
iter : vec:: Drain < ' a , T , A > ,
1623
1623
}
1624
1624
1625
1625
#[ stable( feature = "drain" , since = "1.6.0" ) ]
1626
- impl < ' a , T , A : Allocator + ' a > Iterator for Drain < ' a , T , A > {
1626
+ impl < T , A : Allocator > Iterator for Drain < ' _ , T , A > {
1627
1627
type Item = T ;
1628
1628
1629
1629
#[ inline]
@@ -1638,22 +1638,22 @@ impl<'a, T, A: Allocator + 'a> Iterator for Drain<'a, T, A> {
1638
1638
}
1639
1639
1640
1640
#[ stable( feature = "drain" , since = "1.6.0" ) ]
1641
- impl < ' a , T , A : Allocator + ' a > DoubleEndedIterator for Drain < ' a , T , A > {
1641
+ impl < T , A : Allocator > DoubleEndedIterator for Drain < ' _ , T , A > {
1642
1642
#[ inline]
1643
1643
fn next_back ( & mut self ) -> Option < T > {
1644
1644
self . iter . next_back ( )
1645
1645
}
1646
1646
}
1647
1647
1648
1648
#[ stable( feature = "drain" , since = "1.6.0" ) ]
1649
- impl < ' a , T , A : Allocator + ' a > ExactSizeIterator for Drain < ' a , T , A > {
1649
+ impl < T , A : Allocator > ExactSizeIterator for Drain < ' _ , T , A > {
1650
1650
fn is_empty ( & self ) -> bool {
1651
1651
self . iter . is_empty ( )
1652
1652
}
1653
1653
}
1654
1654
1655
1655
#[ stable( feature = "fused" , since = "1.26.0" ) ]
1656
- impl < ' a , T , A : Allocator + ' a > FusedIterator for Drain < ' a , T , A > { }
1656
+ impl < T , A : Allocator > FusedIterator for Drain < ' _ , T , A > { }
1657
1657
1658
1658
/// A draining iterator over the elements of a `BinaryHeap`.
1659
1659
///
@@ -1666,18 +1666,18 @@ impl<'a, T, A: Allocator + 'a> FusedIterator for Drain<'a, T, A> {}
1666
1666
pub struct DrainSorted <
1667
1667
' a ,
1668
1668
T : Ord ,
1669
- #[ unstable( feature = "allocator_api" , issue = "32838" ) ] A : Allocator + ' a = Global ,
1669
+ #[ unstable( feature = "allocator_api" , issue = "32838" ) ] A : Allocator = Global ,
1670
1670
> {
1671
1671
inner : & ' a mut BinaryHeap < T , A > ,
1672
1672
}
1673
1673
1674
1674
#[ unstable( feature = "binary_heap_drain_sorted" , issue = "59278" ) ]
1675
- impl < ' a , T : Ord , A : Allocator + ' a > Drop for DrainSorted < ' a , T , A > {
1675
+ impl < ' a , T : Ord , A : Allocator > Drop for DrainSorted < ' a , T , A > {
1676
1676
/// Removes heap elements in heap order.
1677
1677
fn drop ( & mut self ) {
1678
- struct DropGuard < ' r , ' a , T : Ord , A : Allocator + ' a > ( & ' r mut DrainSorted < ' a , T , A > ) ;
1678
+ struct DropGuard < ' r , ' a , T : Ord , A : Allocator > ( & ' r mut DrainSorted < ' a , T , A > ) ;
1679
1679
1680
- impl < ' r , ' a , T : Ord , A : Allocator + ' a > Drop for DropGuard < ' r , ' a , T , A > {
1680
+ impl < ' r , ' a , T : Ord , A : Allocator > Drop for DropGuard < ' r , ' a , T , A > {
1681
1681
fn drop ( & mut self ) {
1682
1682
while self . 0 . inner . pop ( ) . is_some ( ) { }
1683
1683
}
@@ -1692,7 +1692,7 @@ impl<'a, T: Ord, A: Allocator + 'a> Drop for DrainSorted<'a, T, A> {
1692
1692
}
1693
1693
1694
1694
#[ unstable( feature = "binary_heap_drain_sorted" , issue = "59278" ) ]
1695
- impl < ' a , T : Ord , A : Allocator + ' a > Iterator for DrainSorted < ' a , T , A > {
1695
+ impl < T : Ord , A : Allocator > Iterator for DrainSorted < ' _ , T , A > {
1696
1696
type Item = T ;
1697
1697
1698
1698
#[ inline]
@@ -1708,13 +1708,13 @@ impl<'a, T: Ord, A: Allocator + 'a> Iterator for DrainSorted<'a, T, A> {
1708
1708
}
1709
1709
1710
1710
#[ unstable( feature = "binary_heap_drain_sorted" , issue = "59278" ) ]
1711
- impl < ' a , T : Ord , A : Allocator + ' a > ExactSizeIterator for DrainSorted < ' a , T , A > { }
1711
+ impl < T : Ord , A : Allocator > ExactSizeIterator for DrainSorted < ' _ , T , A > { }
1712
1712
1713
1713
#[ unstable( feature = "binary_heap_drain_sorted" , issue = "59278" ) ]
1714
- impl < ' a , T : Ord , A : Allocator + ' a > FusedIterator for DrainSorted < ' a , T , A > { }
1714
+ impl < T : Ord , A : Allocator > FusedIterator for DrainSorted < ' _ , T , A > { }
1715
1715
1716
1716
#[ unstable( feature = "trusted_len" , issue = "37572" ) ]
1717
- unsafe impl < ' a , T : Ord , A : Allocator + ' a > TrustedLen for DrainSorted < ' a , T , A > { }
1717
+ unsafe impl < T : Ord , A : Allocator > TrustedLen for DrainSorted < ' _ , T , A > { }
1718
1718
1719
1719
#[ stable( feature = "binary_heap_extras_15" , since = "1.5.0" ) ]
1720
1720
impl < T : Ord , A : Allocator > From < Vec < T , A > > for BinaryHeap < T , A > {
@@ -1791,7 +1791,7 @@ impl<T, A: Allocator> IntoIterator for BinaryHeap<T, A> {
1791
1791
}
1792
1792
1793
1793
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1794
- impl < ' a , T , A : Allocator + ' a > IntoIterator for & ' a BinaryHeap < T , A > {
1794
+ impl < ' a , T , A : Allocator > IntoIterator for & ' a BinaryHeap < T , A > {
1795
1795
type Item = & ' a T ;
1796
1796
type IntoIter = Iter < ' a , T > ;
1797
1797
0 commit comments