@@ -249,7 +249,7 @@ impl<K, Q: ?Sized> super::Recover<Q> for BTreeMap<K, ()>
249
249
250
250
fn replace ( & mut self , key : K ) -> Option < K > {
251
251
self . ensure_root_is_owned ( ) ;
252
- match search:: search_tree :: < marker:: Mut , K , ( ) , K > ( self . root . as_mut ( ) , & key) {
252
+ match search:: search_tree :: < marker:: Mut < ' _ > , K , ( ) , K > ( self . root . as_mut ( ) , & key) {
253
253
Found ( handle) => Some ( mem:: replace ( handle. into_kv_mut ( ) . 0 , key) ) ,
254
254
GoDown ( handle) => {
255
255
VacantEntry {
@@ -280,7 +280,7 @@ pub struct Iter<'a, K: 'a, V: 'a> {
280
280
281
281
#[ stable( feature = "collection_debug" , since = "1.17.0" ) ]
282
282
impl < K : fmt:: Debug , V : fmt:: Debug > fmt:: Debug for Iter < ' _ , K , V > {
283
- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
283
+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
284
284
f. debug_list ( ) . entries ( self . clone ( ) ) . finish ( )
285
285
}
286
286
}
@@ -315,7 +315,7 @@ pub struct IntoIter<K, V> {
315
315
316
316
#[ stable( feature = "collection_debug" , since = "1.17.0" ) ]
317
317
impl < K : fmt:: Debug , V : fmt:: Debug > fmt:: Debug for IntoIter < K , V > {
318
- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
318
+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
319
319
let range = Range {
320
320
front : self . front . reborrow ( ) ,
321
321
back : self . back . reborrow ( ) ,
@@ -338,7 +338,7 @@ pub struct Keys<'a, K: 'a, V: 'a> {
338
338
339
339
#[ stable( feature = "collection_debug" , since = "1.17.0" ) ]
340
340
impl < K : fmt:: Debug , V > fmt:: Debug for Keys < ' _ , K , V > {
341
- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
341
+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
342
342
f. debug_list ( ) . entries ( self . clone ( ) ) . finish ( )
343
343
}
344
344
}
@@ -357,7 +357,7 @@ pub struct Values<'a, K: 'a, V: 'a> {
357
357
358
358
#[ stable( feature = "collection_debug" , since = "1.17.0" ) ]
359
359
impl < K , V : fmt:: Debug > fmt:: Debug for Values < ' _ , K , V > {
360
- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
360
+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
361
361
f. debug_list ( ) . entries ( self . clone ( ) ) . finish ( )
362
362
}
363
363
}
@@ -390,7 +390,7 @@ pub struct Range<'a, K: 'a, V: 'a> {
390
390
391
391
#[ stable( feature = "collection_debug" , since = "1.17.0" ) ]
392
392
impl < K : fmt:: Debug , V : fmt:: Debug > fmt:: Debug for Range < ' _ , K , V > {
393
- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
393
+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
394
394
f. debug_list ( ) . entries ( self . clone ( ) ) . finish ( )
395
395
}
396
396
}
@@ -413,7 +413,7 @@ pub struct RangeMut<'a, K: 'a, V: 'a> {
413
413
414
414
#[ stable( feature = "collection_debug" , since = "1.17.0" ) ]
415
415
impl < K : fmt:: Debug , V : fmt:: Debug > fmt:: Debug for RangeMut < ' _ , K , V > {
416
- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
416
+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
417
417
let range = Range {
418
418
front : self . front . reborrow ( ) ,
419
419
back : self . back . reborrow ( ) ,
@@ -443,7 +443,7 @@ pub enum Entry<'a, K: 'a, V: 'a> {
443
443
444
444
#[ stable( feature= "debug_btree_map" , since = "1.12.0" ) ]
445
445
impl < K : Debug + Ord , V : Debug > Debug for Entry < ' _ , K , V > {
446
- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
446
+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
447
447
match * self {
448
448
Vacant ( ref v) => f. debug_tuple ( "Entry" )
449
449
. field ( v)
@@ -471,7 +471,7 @@ pub struct VacantEntry<'a, K: 'a, V: 'a> {
471
471
472
472
#[ stable( feature= "debug_btree_map" , since = "1.12.0" ) ]
473
473
impl < K : Debug + Ord , V > Debug for VacantEntry < ' _ , K , V > {
474
- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
474
+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
475
475
f. debug_tuple ( "VacantEntry" )
476
476
. field ( self . key ( ) )
477
477
. finish ( )
@@ -494,7 +494,7 @@ pub struct OccupiedEntry<'a, K: 'a, V: 'a> {
494
494
495
495
#[ stable( feature= "debug_btree_map" , since = "1.12.0" ) ]
496
496
impl < K : Debug + Ord , V : Debug > Debug for OccupiedEntry < ' _ , K , V > {
497
- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
497
+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
498
498
f. debug_struct ( "OccupiedEntry" )
499
499
. field ( "key" , self . key ( ) )
500
500
. field ( "value" , self . get ( ) )
@@ -818,7 +818,7 @@ impl<K: Ord, V> BTreeMap<K, V> {
818
818
/// assert_eq!(Some((&5, &"b")), map.range(4..).next());
819
819
/// ```
820
820
#[ stable( feature = "btree_range" , since = "1.17.0" ) ]
821
- pub fn range < T : ?Sized , R > ( & self , range : R ) -> Range < K , V >
821
+ pub fn range < T : ?Sized , R > ( & self , range : R ) -> Range < ' _ , K , V >
822
822
where T : Ord , K : Borrow < T > , R : RangeBounds < T >
823
823
{
824
824
let root1 = self . root . as_ref ( ) ;
@@ -859,7 +859,7 @@ impl<K: Ord, V> BTreeMap<K, V> {
859
859
/// }
860
860
/// ```
861
861
#[ stable( feature = "btree_range" , since = "1.17.0" ) ]
862
- pub fn range_mut < T : ?Sized , R > ( & mut self , range : R ) -> RangeMut < K , V >
862
+ pub fn range_mut < T : ?Sized , R > ( & mut self , range : R ) -> RangeMut < ' _ , K , V >
863
863
where T : Ord , K : Borrow < T > , R : RangeBounds < T >
864
864
{
865
865
let root1 = self . root . as_mut ( ) ;
@@ -892,7 +892,7 @@ impl<K: Ord, V> BTreeMap<K, V> {
892
892
/// assert_eq!(count["a"], 3);
893
893
/// ```
894
894
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
895
- pub fn entry ( & mut self , key : K ) -> Entry < K , V > {
895
+ pub fn entry ( & mut self , key : K ) -> Entry < ' _ , K , V > {
896
896
// FIXME(@porglezomp) Avoid allocating if we don't insert
897
897
self . ensure_root_is_owned ( ) ;
898
898
match search:: search_tree ( self . root . as_mut ( ) , & key) {
@@ -1783,7 +1783,7 @@ impl<K: Ord, V: Ord> Ord for BTreeMap<K, V> {
1783
1783
1784
1784
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1785
1785
impl < K : Debug , V : Debug > Debug for BTreeMap < K , V > {
1786
- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
1786
+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
1787
1787
f. debug_map ( ) . entries ( self . iter ( ) ) . finish ( )
1788
1788
}
1789
1789
}
@@ -1940,7 +1940,7 @@ impl<K, V> BTreeMap<K, V> {
1940
1940
/// assert_eq!((*first_key, *first_value), (1, "a"));
1941
1941
/// ```
1942
1942
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1943
- pub fn iter ( & self ) -> Iter < K , V > {
1943
+ pub fn iter ( & self ) -> Iter < ' _ , K , V > {
1944
1944
Iter {
1945
1945
range : Range {
1946
1946
front : first_leaf_edge ( self . root . as_ref ( ) ) ,
@@ -1972,7 +1972,7 @@ impl<K, V> BTreeMap<K, V> {
1972
1972
/// }
1973
1973
/// ```
1974
1974
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1975
- pub fn iter_mut ( & mut self ) -> IterMut < K , V > {
1975
+ pub fn iter_mut ( & mut self ) -> IterMut < ' _ , K , V > {
1976
1976
let root1 = self . root . as_mut ( ) ;
1977
1977
let root2 = unsafe { ptr:: read ( & root1) } ;
1978
1978
IterMut {
@@ -2049,7 +2049,7 @@ impl<K, V> BTreeMap<K, V> {
2049
2049
/// String::from("goodbye!")]);
2050
2050
/// ```
2051
2051
#[ stable( feature = "map_values_mut" , since = "1.10.0" ) ]
2052
- pub fn values_mut ( & mut self ) -> ValuesMut < K , V > {
2052
+ pub fn values_mut ( & mut self ) -> ValuesMut < ' _ , K , V > {
2053
2053
ValuesMut { inner : self . iter_mut ( ) }
2054
2054
}
2055
2055
0 commit comments