@@ -462,6 +462,8 @@ impl<K: Ord, V> BTreeMap<K, V> {
462462 }
463463}
464464
465+ // NOTE(stage0): remove impl after a snapshot
466+ #[ cfg( stage0) ]
465467impl < K , V > IntoIterator for BTreeMap < K , V > {
466468 type IntoIter = IntoIter < K , V > ;
467469
@@ -470,6 +472,18 @@ impl<K, V> IntoIterator for BTreeMap<K, V> {
470472 }
471473}
472474
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) ]
473487impl < ' a , K , V > IntoIterator for & ' a BTreeMap < K , V > {
474488 type IntoIter = Iter < ' a , K , V > ;
475489
@@ -478,6 +492,18 @@ impl<'a, K, V> IntoIterator for &'a BTreeMap<K, V> {
478492 }
479493}
480494
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) ]
481507impl < ' a , K , V > IntoIterator for & ' a mut BTreeMap < K , V > {
482508 type IntoIter = IterMut < ' a , K , V > ;
483509
@@ -486,6 +512,16 @@ impl<'a, K, V> IntoIterator for &'a mut BTreeMap<K, V> {
486512 }
487513}
488514
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+
489525/// A helper enum useful for deciding whether to continue a loop since we can't
490526/// return from a closure
491527enum Continuation < A , B > {
0 commit comments