@@ -311,14 +311,14 @@ pub struct PeekMut<'a, T: 'a, C: 'a + Compare<T>> {
311
311
}
312
312
313
313
// #[stable(feature = "collection_debug", since = "1.17.0")]
314
- impl < ' a , T : fmt:: Debug , C : Compare < T > > fmt:: Debug for PeekMut < ' a , T , C > {
315
- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
314
+ impl < T : fmt:: Debug , C : Compare < T > > fmt:: Debug for PeekMut < ' _ , T , C > {
315
+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
316
316
f. debug_tuple ( "PeekMut" ) . field ( & self . heap . data [ 0 ] ) . finish ( )
317
317
}
318
318
}
319
319
320
320
// #[stable(feature = "binary_heap_peek_mut", since = "1.12.0")]
321
- impl < ' a , T , C : Compare < T > > Drop for PeekMut < ' a , T , C > {
321
+ impl < T , C : Compare < T > > Drop for PeekMut < ' _ , T , C > {
322
322
fn drop ( & mut self ) {
323
323
if self . sift {
324
324
// SAFETY: PeekMut is only instantiated for non-empty heaps.
@@ -328,7 +328,7 @@ impl<'a, T, C: Compare<T>> Drop for PeekMut<'a, T, C> {
328
328
}
329
329
330
330
// #[stable(feature = "binary_heap_peek_mut", since = "1.12.0")]
331
- impl < ' a , T , C : Compare < T > > Deref for PeekMut < ' a , T , C > {
331
+ impl < T , C : Compare < T > > Deref for PeekMut < ' _ , T , C > {
332
332
type Target = T ;
333
333
fn deref ( & self ) -> & T {
334
334
debug_assert ! ( !self . heap. is_empty( ) ) ;
@@ -338,7 +338,7 @@ impl<'a, T, C: Compare<T>> Deref for PeekMut<'a, T, C> {
338
338
}
339
339
340
340
// #[stable(feature = "binary_heap_peek_mut", since = "1.12.0")]
341
- impl < ' a , T , C : Compare < T > > DerefMut for PeekMut < ' a , T , C > {
341
+ impl < T , C : Compare < T > > DerefMut for PeekMut < ' _ , T , C > {
342
342
fn deref_mut ( & mut self ) -> & mut T {
343
343
debug_assert ! ( !self . heap. is_empty( ) ) ;
344
344
self . sift = true ;
@@ -382,7 +382,7 @@ impl<T: Ord> Default for BinaryHeap<T> {
382
382
383
383
// #[stable(feature = "binaryheap_debug", since = "1.4.0")]
384
384
impl < T : fmt:: Debug , C : Compare < T > > fmt:: Debug for BinaryHeap < T , C > {
385
- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
385
+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
386
386
f. debug_list ( ) . entries ( self . iter ( ) ) . finish ( )
387
387
}
388
388
}
@@ -753,7 +753,7 @@ impl<T, C: Compare<T>> BinaryHeap<T, C> {
753
753
/// assert_eq!(heap.peek(), Some(&2));
754
754
/// ```
755
755
// #[stable(feature = "binary_heap_peek_mut", since = "1.12.0")]
756
- pub fn peek_mut ( & mut self ) -> Option < PeekMut < T , C > > {
756
+ pub fn peek_mut ( & mut self ) -> Option < PeekMut < ' _ , T , C > > {
757
757
if self . is_empty ( ) {
758
758
None
759
759
} else {
@@ -1169,7 +1169,7 @@ impl<T, C: Compare<T>> BinaryHeap<T, C> {
1169
1169
/// ```
1170
1170
#[ inline]
1171
1171
// #[stable(feature = "drain", since = "1.6.0")]
1172
- pub fn drain ( & mut self ) -> Drain < T > {
1172
+ pub fn drain ( & mut self ) -> Drain < ' _ , T > {
1173
1173
Drain {
1174
1174
iter : self . data . drain ( ..) ,
1175
1175
}
@@ -1344,7 +1344,7 @@ impl<'a, T> Hole<'a, T> {
1344
1344
}
1345
1345
}
1346
1346
1347
- impl < ' a , T > Drop for Hole < ' a , T > {
1347
+ impl < T > Drop for Hole < ' _ , T > {
1348
1348
#[ inline]
1349
1349
fn drop ( & mut self ) {
1350
1350
// fill the hole again
@@ -1368,16 +1368,16 @@ pub struct Iter<'a, T: 'a> {
1368
1368
}
1369
1369
1370
1370
// #[stable(feature = "collection_debug", since = "1.17.0")]
1371
- impl < ' a , T : ' a + fmt:: Debug > fmt:: Debug for Iter < ' a , T > {
1372
- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
1371
+ impl < T : fmt:: Debug > fmt:: Debug for Iter < ' _ , T > {
1372
+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
1373
1373
f. debug_tuple ( "Iter" ) . field ( & self . iter . as_slice ( ) ) . finish ( )
1374
1374
}
1375
1375
}
1376
1376
1377
1377
// FIXME(#26925) Remove in favor of `#[derive(Clone)]`
1378
1378
// #[stable(feature = "rust1", since = "1.0.0")]
1379
- impl < ' a , T > Clone for Iter < ' a , T > {
1380
- fn clone ( & self ) -> Iter < ' a , T > {
1379
+ impl < T > Clone for Iter < ' _ , T > {
1380
+ fn clone ( & self ) -> Self {
1381
1381
Iter {
1382
1382
iter : self . iter . clone ( ) ,
1383
1383
}
@@ -1432,7 +1432,7 @@ pub struct IntoIter<T> {
1432
1432
1433
1433
// #[stable(feature = "collection_debug", since = "1.17.0")]
1434
1434
impl < T : fmt:: Debug > fmt:: Debug for IntoIter < T > {
1435
- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
1435
+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
1436
1436
f. debug_tuple ( "IntoIter" )
1437
1437
. field ( & self . iter . as_slice ( ) )
1438
1438
. finish ( )
@@ -1508,7 +1508,7 @@ pub struct Drain<'a, T: 'a> {
1508
1508
}
1509
1509
1510
1510
// #[stable(feature = "drain", since = "1.6.0")]
1511
- impl < ' a , T : ' a > Iterator for Drain < ' a , T > {
1511
+ impl < T > Iterator for Drain < ' _ , T > {
1512
1512
type Item = T ;
1513
1513
1514
1514
#[ inline]
@@ -1523,7 +1523,7 @@ impl<'a, T: 'a> Iterator for Drain<'a, T> {
1523
1523
}
1524
1524
1525
1525
// #[stable(feature = "drain", since = "1.6.0")]
1526
- impl < ' a , T : ' a > DoubleEndedIterator for Drain < ' a , T > {
1526
+ impl < T > DoubleEndedIterator for Drain < ' _ , T > {
1527
1527
#[ inline]
1528
1528
fn next_back ( & mut self ) -> Option < T > {
1529
1529
self . iter . next_back ( )
0 commit comments