@@ -462,6 +462,8 @@ impl<K: Ord, V> BTreeMap<K, V> {
462
462
}
463
463
}
464
464
465
+ // NOTE(stage0): remove impl after a snapshot
466
+ #[ cfg( stage0) ]
465
467
impl < K , V > IntoIterator for BTreeMap < K , V > {
466
468
type IntoIter = IntoIter < K , V > ;
467
469
@@ -470,6 +472,18 @@ impl<K, V> IntoIterator for BTreeMap<K, V> {
470
472
}
471
473
}
472
474
475
+ #[ cfg( not( stage0) ) ] // NOTE(stage0): remove cfg after a snapshot
476
+ impl < K , V > IntoIterator for BTreeMap < K , V > {
477
+ type Item = ( K , V ) ;
478
+ type IntoIter = IntoIter < K , V > ;
479
+
480
+ fn into_iter ( self ) -> IntoIter < K , V > {
481
+ self . into_iter ( )
482
+ }
483
+ }
484
+
485
+ // NOTE(stage0): remove impl after a snapshot
486
+ #[ cfg( stage0) ]
473
487
impl < ' a , K , V > IntoIterator for & ' a BTreeMap < K , V > {
474
488
type IntoIter = Iter < ' a , K , V > ;
475
489
@@ -478,6 +492,18 @@ impl<'a, K, V> IntoIterator for &'a BTreeMap<K, V> {
478
492
}
479
493
}
480
494
495
+ #[ cfg( not( stage0) ) ] // NOTE(stage0): remove cfg after a snapshot
496
+ impl < ' a , K , V > IntoIterator for & ' a BTreeMap < K , V > {
497
+ type Item = ( & ' a K , & ' a V ) ;
498
+ type IntoIter = Iter < ' a , K , V > ;
499
+
500
+ fn into_iter ( self ) -> Iter < ' a , K , V > {
501
+ self . iter ( )
502
+ }
503
+ }
504
+
505
+ // NOTE(stage0): remove impl after a snapshot
506
+ #[ cfg( stage0) ]
481
507
impl < ' a , K , V > IntoIterator for & ' a mut BTreeMap < K , V > {
482
508
type IntoIter = IterMut < ' a , K , V > ;
483
509
@@ -486,6 +512,16 @@ impl<'a, K, V> IntoIterator for &'a mut BTreeMap<K, V> {
486
512
}
487
513
}
488
514
515
+ #[ cfg( not( stage0) ) ] // NOTE(stage0): remove cfg after a snapshot
516
+ impl < ' a , K , V > IntoIterator for & ' a mut BTreeMap < K , V > {
517
+ type Item = ( & ' a K , & ' a mut V ) ;
518
+ type IntoIter = IterMut < ' a , K , V > ;
519
+
520
+ fn into_iter ( mut self ) -> IterMut < ' a , K , V > {
521
+ self . iter_mut ( )
522
+ }
523
+ }
524
+
489
525
/// A helper enum useful for deciding whether to continue a loop since we can't
490
526
/// return from a closure
491
527
enum Continuation < A , B > {
0 commit comments