@@ -151,8 +151,8 @@ use core::mem::{swap, size_of, ManuallyDrop};
151151use core:: ptr;
152152use core:: fmt;
153153
154- use slice;
155- use vec:: { self , Vec } ;
154+ use crate :: slice;
155+ use crate :: vec:: { self , Vec } ;
156156
157157use super :: SpecExtend ;
158158
@@ -227,16 +227,16 @@ pub struct PeekMut<'a, T: 'a + Ord> {
227227}
228228
229229#[ stable( feature = "collection_debug" , since = "1.17.0" ) ]
230- impl < ' a , T : Ord + fmt:: Debug > fmt:: Debug for PeekMut < ' a , T > {
231- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
230+ impl < T : Ord + fmt:: Debug > fmt:: Debug for PeekMut < ' _ , T > {
231+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
232232 f. debug_tuple ( "PeekMut" )
233233 . field ( & self . heap . data [ 0 ] )
234234 . finish ( )
235235 }
236236}
237237
238238#[ stable( feature = "binary_heap_peek_mut" , since = "1.12.0" ) ]
239- impl < ' a , T : Ord > Drop for PeekMut < ' a , T > {
239+ impl < T : Ord > Drop for PeekMut < ' _ , T > {
240240 fn drop ( & mut self ) {
241241 if self . sift {
242242 self . heap . sift_down ( 0 ) ;
@@ -245,15 +245,15 @@ impl<'a, T: Ord> Drop for PeekMut<'a, T> {
245245}
246246
247247#[ stable( feature = "binary_heap_peek_mut" , since = "1.12.0" ) ]
248- impl < ' a , T : Ord > Deref for PeekMut < ' a , T > {
248+ impl < T : Ord > Deref for PeekMut < ' _ , T > {
249249 type Target = T ;
250250 fn deref ( & self ) -> & T {
251251 & self . heap . data [ 0 ]
252252 }
253253}
254254
255255#[ stable( feature = "binary_heap_peek_mut" , since = "1.12.0" ) ]
256- impl < ' a , T : Ord > DerefMut for PeekMut < ' a , T > {
256+ impl < T : Ord > DerefMut for PeekMut < ' _ , T > {
257257 fn deref_mut ( & mut self ) -> & mut T {
258258 & mut self . heap . data [ 0 ]
259259 }
@@ -291,7 +291,7 @@ impl<T: Ord> Default for BinaryHeap<T> {
291291
292292#[ stable( feature = "binaryheap_debug" , since = "1.4.0" ) ]
293293impl < T : fmt:: Debug + Ord > fmt:: Debug for BinaryHeap < T > {
294- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
294+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
295295 f. debug_list ( ) . entries ( self . iter ( ) ) . finish ( )
296296 }
297297}
@@ -349,7 +349,7 @@ impl<T: Ord> BinaryHeap<T> {
349349 /// }
350350 /// ```
351351 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
352- pub fn iter ( & self ) -> Iter < T > {
352+ pub fn iter ( & self ) -> Iter < ' _ , T > {
353353 Iter { iter : self . data . iter ( ) }
354354 }
355355
@@ -400,7 +400,7 @@ impl<T: Ord> BinaryHeap<T> {
400400 /// assert_eq!(heap.peek(), Some(&2));
401401 /// ```
402402 #[ stable( feature = "binary_heap_peek_mut" , since = "1.12.0" ) ]
403- pub fn peek_mut ( & mut self ) -> Option < PeekMut < T > > {
403+ pub fn peek_mut ( & mut self ) -> Option < PeekMut < ' _ , T > > {
404404 if self . is_empty ( ) {
405405 None
406406 } else {
@@ -761,7 +761,7 @@ impl<T: Ord> BinaryHeap<T> {
761761 /// ```
762762 #[ inline]
763763 #[ stable( feature = "drain" , since = "1.6.0" ) ]
764- pub fn drain ( & mut self ) -> Drain < T > {
764+ pub fn drain ( & mut self ) -> Drain < ' _ , T > {
765765 Drain { iter : self . data . drain ( ..) }
766766 }
767767
@@ -908,7 +908,7 @@ impl<'a, T> Hole<'a, T> {
908908 }
909909}
910910
911- impl < ' a , T > Drop for Hole < ' a , T > {
911+ impl < T > Drop for Hole < ' _ , T > {
912912 #[ inline]
913913 fn drop ( & mut self ) {
914914 // fill the hole again
@@ -932,8 +932,8 @@ pub struct Iter<'a, T: 'a> {
932932}
933933
934934#[ stable( feature = "collection_debug" , since = "1.17.0" ) ]
935- impl < ' a , T : ' a + fmt:: Debug > fmt:: Debug for Iter < ' a , T > {
936- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
935+ impl < T : fmt:: Debug > fmt:: Debug for Iter < ' _ , T > {
936+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
937937 f. debug_tuple ( "Iter" )
938938 . field ( & self . iter . as_slice ( ) )
939939 . finish ( )
@@ -972,14 +972,14 @@ impl<'a, T> DoubleEndedIterator for Iter<'a, T> {
972972}
973973
974974#[ stable( feature = "rust1" , since = "1.0.0" ) ]
975- impl < ' a , T > ExactSizeIterator for Iter < ' a , T > {
975+ impl < T > ExactSizeIterator for Iter < ' _ , T > {
976976 fn is_empty ( & self ) -> bool {
977977 self . iter . is_empty ( )
978978 }
979979}
980980
981981#[ stable( feature = "fused" , since = "1.26.0" ) ]
982- impl < ' a , T > FusedIterator for Iter < ' a , T > { }
982+ impl < T > FusedIterator for Iter < ' _ , T > { }
983983
984984/// An owning iterator over the elements of a `BinaryHeap`.
985985///
@@ -996,7 +996,7 @@ pub struct IntoIter<T> {
996996
997997#[ stable( feature = "collection_debug" , since = "1.17.0" ) ]
998998impl < T : fmt:: Debug > fmt:: Debug for IntoIter < T > {
999- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
999+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
10001000 f. debug_tuple ( "IntoIter" )
10011001 . field ( & self . iter . as_slice ( ) )
10021002 . finish ( )
@@ -1050,7 +1050,7 @@ pub struct Drain<'a, T: 'a> {
10501050}
10511051
10521052#[ stable( feature = "drain" , since = "1.6.0" ) ]
1053- impl < ' a , T : ' a > Iterator for Drain < ' a , T > {
1053+ impl < T > Iterator for Drain < ' _ , T > {
10541054 type Item = T ;
10551055
10561056 #[ inline]
@@ -1065,22 +1065,22 @@ impl<'a, T: 'a> Iterator for Drain<'a, T> {
10651065}
10661066
10671067#[ stable( feature = "drain" , since = "1.6.0" ) ]
1068- impl < ' a , T : ' a > DoubleEndedIterator for Drain < ' a , T > {
1068+ impl < T > DoubleEndedIterator for Drain < ' _ , T > {
10691069 #[ inline]
10701070 fn next_back ( & mut self ) -> Option < T > {
10711071 self . iter . next_back ( )
10721072 }
10731073}
10741074
10751075#[ stable( feature = "drain" , since = "1.6.0" ) ]
1076- impl < ' a , T : ' a > ExactSizeIterator for Drain < ' a , T > {
1076+ impl < T > ExactSizeIterator for Drain < ' _ , T > {
10771077 fn is_empty ( & self ) -> bool {
10781078 self . iter . is_empty ( )
10791079 }
10801080}
10811081
10821082#[ stable( feature = "fused" , since = "1.26.0" ) ]
1083- impl < ' a , T : ' a > FusedIterator for Drain < ' a , T > { }
1083+ impl < T > FusedIterator for Drain < ' _ , T > { }
10841084
10851085#[ stable( feature = "binary_heap_extras_15" , since = "1.5.0" ) ]
10861086impl < T : Ord > From < Vec < T > > for BinaryHeap < T > {
0 commit comments