@@ -292,14 +292,14 @@ pub struct PeekMut<
292292}
293293
294294#[ stable( feature = "collection_debug" , since = "1.17.0" ) ]
295- impl < T : Ord + fmt:: Debug , A : Allocator > fmt:: Debug for PeekMut < ' _ , T , A > {
295+ impl < ' a , T : Ord + fmt:: Debug , A : Allocator + ' a > fmt:: Debug for PeekMut < ' a , T , A > {
296296 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
297297 f. debug_tuple ( "PeekMut" ) . field ( & self . heap . data [ 0 ] ) . finish ( )
298298 }
299299}
300300
301301#[ stable( feature = "binary_heap_peek_mut" , since = "1.12.0" ) ]
302- impl < T : Ord , A : Allocator > Drop for PeekMut < ' _ , T , A > {
302+ impl < ' a , T : Ord , A : Allocator + ' a > Drop for PeekMut < ' a , T , A > {
303303 fn drop ( & mut self ) {
304304 if self . sift {
305305 // SAFETY: PeekMut is only instantiated for non-empty heaps.
@@ -309,7 +309,7 @@ impl<T: Ord, A: Allocator> Drop for PeekMut<'_, T, A> {
309309}
310310
311311#[ stable( feature = "binary_heap_peek_mut" , since = "1.12.0" ) ]
312- impl < T : Ord , A : Allocator > Deref for PeekMut < ' _ , T , A > {
312+ impl < ' a , T : Ord , A : Allocator + ' a > Deref for PeekMut < ' a , T , A > {
313313 type Target = T ;
314314 fn deref ( & self ) -> & T {
315315 debug_assert ! ( !self . heap. is_empty( ) ) ;
@@ -319,7 +319,7 @@ impl<T: Ord, A: Allocator> Deref for PeekMut<'_, T, A> {
319319}
320320
321321#[ stable( feature = "binary_heap_peek_mut" , since = "1.12.0" ) ]
322- impl < T : Ord , A : Allocator > DerefMut for PeekMut < ' _ , T , A > {
322+ impl < ' a , T : Ord , A : Allocator + ' a > DerefMut for PeekMut < ' a , T , A > {
323323 fn deref_mut ( & mut self ) -> & mut T {
324324 debug_assert ! ( !self . heap. is_empty( ) ) ;
325325 self . sift = true ;
@@ -328,10 +328,10 @@ impl<T: Ord, A: Allocator> DerefMut for PeekMut<'_, T, A> {
328328 }
329329}
330330
331- impl < ' a , T : Ord > PeekMut < ' a , T > {
331+ impl < ' a , T : Ord , A : Allocator + ' a > PeekMut < ' a , T , A > {
332332 /// Removes the peeked value from the heap and returns it.
333333 #[ stable( feature = "binary_heap_peek_mut_pop" , since = "1.18.0" ) ]
334- pub fn pop ( mut this : PeekMut < ' a , T > ) -> T {
334+ pub fn pop ( mut this : PeekMut < ' a , T , A > ) -> T {
335335 let value = this. heap . pop ( ) . unwrap ( ) ;
336336 this. sift = false ;
337337 value
@@ -1611,7 +1611,7 @@ impl<'a, T: Ord, A: Allocator + 'a> Drop for DrainSorted<'a, T, A> {
16111611}
16121612
16131613#[ unstable( feature = "binary_heap_drain_sorted" , issue = "59278" ) ]
1614- impl < T : Ord , A : Allocator > Iterator for DrainSorted < ' _ , T , A > {
1614+ impl < ' a , T : Ord , A : Allocator + ' a > Iterator for DrainSorted < ' a , T , A > {
16151615 type Item = T ;
16161616
16171617 #[ inline]
@@ -1627,13 +1627,13 @@ impl<T: Ord, A: Allocator> Iterator for DrainSorted<'_, T, A> {
16271627}
16281628
16291629#[ unstable( feature = "binary_heap_drain_sorted" , issue = "59278" ) ]
1630- impl < T : Ord , A : Allocator > ExactSizeIterator for DrainSorted < ' _ , T , A > { }
1630+ impl < ' a , T : Ord , A : Allocator + ' a > ExactSizeIterator for DrainSorted < ' a , T , A > { }
16311631
16321632#[ unstable( feature = "binary_heap_drain_sorted" , issue = "59278" ) ]
1633- impl < T : Ord , A : Allocator > FusedIterator for DrainSorted < ' _ , T , A > { }
1633+ impl < ' a , T : Ord , A : Allocator + ' a > FusedIterator for DrainSorted < ' a , T , A > { }
16341634
16351635#[ unstable( feature = "trusted_len" , issue = "37572" ) ]
1636- unsafe impl < T : Ord , A : Allocator > TrustedLen for DrainSorted < ' _ , T , A > { }
1636+ unsafe impl < ' a , T : Ord , A : Allocator + ' a > TrustedLen for DrainSorted < ' a , T , A > { }
16371637
16381638#[ stable( feature = "binary_heap_extras_15" , since = "1.5.0" ) ]
16391639impl < T : Ord , A : Allocator > From < Vec < T , A > > for BinaryHeap < T , A > {
0 commit comments