@@ -376,6 +376,7 @@ pub(super) trait SplitIter: DoubleEndedIterator {
376376
377377split_iter ! {
378378 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
379+ #[ debug( stable( feature = "core_impl_debug" , since = "1.9.0" ) ) ]
379380 #[ fused( stable( feature = "fused" , since = "1.26.0" ) ) ]
380381 #[ must_use = "iterators are lazy and do nothing unless consumed" ]
381382 /// An iterator over subslices separated by elements that match a predicate
@@ -393,12 +394,16 @@ split_iter! {
393394 /// [`split`]: slice::split
394395 /// [slices]: slice
395396 struct Split <shared_ref: & ' a> {
396- #[ stable( feature = "core_impl_debug" , since = "1.9.0" ) ]
397- debug: "Split" ,
398397 include_leading: false ,
399398 include_trailing: false ,
400399 }
400+ }
401401
402+ impl < ' a , T , P > Split < ' a , T , P >
403+ where
404+ T : ' a ,
405+ P : FnMut ( & T ) -> bool ,
406+ {
402407 /// Returns a slice which contains items not yet handled by split.
403408 /// # Example
404409 ///
@@ -417,6 +422,7 @@ split_iter! {
417422
418423split_iter ! {
419424 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
425+ #[ debug( stable( feature = "core_impl_debug" , since = "1.9.0" ) ) ]
420426 #[ fused( stable( feature = "fused" , since = "1.26.0" ) ) ]
421427 #[ must_use = "iterators are lazy and do nothing unless consumed" ]
422428 /// An iterator over the mutable subslices of the vector which are separated
@@ -434,15 +440,14 @@ split_iter! {
434440 /// [`split_mut`]: slice::split_mut
435441 /// [slices]: slice
436442 struct SplitMut <mut_ref: & ' a> {
437- #[ stable( feature = "core_impl_debug" , since = "1.9.0" ) ]
438- debug: "SplitMut" ,
439443 include_leading: false ,
440444 include_trailing: false ,
441445 }
442446}
443447
444448split_iter ! {
445449 #[ stable( feature = "split_inclusive" , since = "1.51.0" ) ]
450+ #[ debug( stable( feature = "core_impl_debug" , since = "1.9.0" ) ) ]
446451 #[ fused( stable( feature = "split_inclusive" , since = "1.51.0" ) ) ]
447452 #[ must_use = "iterators are lazy and do nothing unless consumed" ]
448453 /// An iterator over subslices separated by elements that match a predicate
@@ -461,15 +466,14 @@ split_iter! {
461466 /// [`split_inclusive`]: slice::split_inclusive
462467 /// [slices]: slice
463468 struct SplitInclusive <shared_ref: & ' a> {
464- #[ stable( feature = "split_inclusive" , since = "1.51.0" ) ]
465- debug: "SplitInclusive" ,
466469 include_leading: false ,
467470 include_trailing: true ,
468471 }
469472}
470473
471474split_iter ! {
472475 #[ stable( feature = "split_inclusive" , since = "1.51.0" ) ]
476+ #[ debug( stable( feature = "split_inclusive" , since = "1.51.0" ) ) ]
473477 #[ fused( stable( feature = "split_inclusive" , since = "1.51.0" ) ) ]
474478 #[ must_use = "iterators are lazy and do nothing unless consumed" ]
475479 /// An iterator over the mutable subslices of the vector which are separated
@@ -488,15 +492,14 @@ split_iter! {
488492 /// [`split_inclusive_mut`]: slice::split_inclusive_mut
489493 /// [slices]: slice
490494 struct SplitInclusiveMut <mut_ref: & ' a> {
491- #[ stable( feature = "split_inclusive" , since = "1.51.0" ) ]
492- debug: "SplitInclusiveMut" ,
493495 include_leading: false ,
494496 include_trailing: true ,
495497 }
496498}
497499
498500split_iter ! {
499501 #[ unstable( feature = "split_inclusive_variants" , issue = "none" ) ]
502+ #[ debug( stable( feature = "split_inclusive" , since = "1.51.0" ) ) ]
500503 #[ fused( unstable( feature = "split_inclusive_variants" , issue = "none" ) ) ]
501504 #[ must_use = "iterators are lazy and do nothing unless consumed" ]
502505 /// An iterator over subslices separated by elements that match a predicate
@@ -517,15 +520,14 @@ split_iter! {
517520 /// [`split_left_inclusive`]: slice::split_left_inclusive
518521 /// [slices]: slice
519522 struct SplitLeftInclusive <shared_ref: & ' a> {
520- #[ unstable( feature = "split_inclusive_variants" , issue = "none" ) ]
521- debug: "SplitLeftInclusive" ,
522523 include_leading: true ,
523524 include_trailing: false ,
524525 }
525526}
526527
527528split_iter ! {
528529 #[ unstable( feature = "split_inclusive_variants" , issue = "none" ) ]
530+ #[ debug( unstable( feature = "split_inclusive_variants" , issue = "none" ) ) ]
529531 #[ fused( unstable( feature = "split_inclusive_variants" , issue = "none" ) ) ]
530532 #[ must_use = "iterators are lazy and do nothing unless consumed" ]
531533 /// An iterator over the mutable subslices of the vector which are separated
@@ -547,8 +549,6 @@ split_iter! {
547549 /// [`split_left_inclusive_mut`]: slice::split_left_inclusive_mut
548550 /// [slices]: slice
549551 struct SplitLeftInclusiveMut <mut_ref: & ' a> {
550- #[ unstable( feature = "split_inclusive_variants" , issue = "none" ) ]
551- debug: "SplitLeftInclusiveMut" ,
552552 include_leading: true ,
553553 include_trailing: false ,
554554 }
@@ -571,7 +571,7 @@ reverse_iter! {
571571 ///
572572 /// [`rsplit`]: slice::rsplit
573573 /// [slices]: slice
574- pub struct RSplit { "RSplit" ; Split } : Clone
574+ pub struct RSplit { inner : Split } : Clone
575575}
576576
577577reverse_iter ! {
@@ -594,7 +594,7 @@ reverse_iter! {
594594 ///
595595 /// [`rsplit_left_inclusive`]: slice::rsplit_inclusive
596596 /// [slices]: slice
597- pub struct RSplitInclusive { "RSplitInclusive" ; SplitInclusive } : Clone
597+ pub struct RSplitInclusive { inner : SplitInclusive } : Clone
598598}
599599
600600reverse_iter ! {
@@ -617,7 +617,7 @@ reverse_iter! {
617617 ///
618618 /// [`rsplit_left_inclusive`]: slice::rsplit_left_inclusive
619619 /// [slices]: slice
620- pub struct RSplitLeftInclusive { "RSplitLeftInclusive" ; SplitLeftInclusive } : Clone
620+ pub struct RSplitLeftInclusive { inner : SplitLeftInclusive } : Clone
621621}
622622
623623reverse_iter ! {
@@ -637,7 +637,7 @@ reverse_iter! {
637637 ///
638638 /// [`rsplit_mut`]: slice::rsplit_mut
639639 /// [slices]: slice
640- pub struct RSplitMut { "RSplitMut" ; SplitMut }
640+ pub struct RSplitMut { inner : SplitMut }
641641}
642642
643643reverse_iter ! {
@@ -660,7 +660,7 @@ reverse_iter! {
660660 ///
661661 /// [`rsplit_inclusive_mut`]: slice::rsplit_inclusive_mut
662662 /// [slices]: slice
663- pub struct RSplitInclusiveMut { "RSplitInclusiveMut" ; SplitInclusiveMut }
663+ pub struct RSplitInclusiveMut { inner : SplitInclusiveMut }
664664}
665665
666666reverse_iter ! {
@@ -683,7 +683,7 @@ reverse_iter! {
683683 ///
684684 /// [`rsplit_left_inclusive_mut`]: slice::rsplit_left_inclusive_mut
685685 /// [slices]: slice
686- pub struct RSplitLeftInclusiveMut { "RSplitLeftInclusiveMut" ; SplitLeftInclusiveMut }
686+ pub struct RSplitLeftInclusiveMut { inner : SplitLeftInclusiveMut }
687687}
688688
689689/// An private iterator over subslices separated by elements that
@@ -741,7 +741,10 @@ iter_n! {
741741 ///
742742 /// [`splitn`]: slice::splitn
743743 /// [slices]: slice
744- pub struct SplitN { "SplitN" ; Split } : Clone
744+ pub struct SplitN { inner: Split } : Clone
745+
746+ #[ unstable( feature = "split_inclusive_variants" , issue = "none" ) ]
747+ fn max_items;
745748}
746749
747750iter_n ! {
@@ -763,7 +766,10 @@ iter_n! {
763766 ///
764767 /// [`rsplitn`]: slice::rsplitn
765768 /// [slices]: slice
766- pub struct RSplitN { "RSplitN" ; RSplit } : Clone
769+ pub struct RSplitN { inner: RSplit } : Clone
770+
771+ #[ unstable( feature = "split_inclusive_variants" , issue = "none" ) ]
772+ fn max_items;
767773}
768774
769775iter_n ! {
@@ -784,7 +790,10 @@ iter_n! {
784790 ///
785791 /// [`splitn_mut`]: slice::splitn_mut
786792 /// [slices]: slice
787- pub struct SplitNMut { "SplitNMut" ; SplitMut }
793+ pub struct SplitNMut { inner: SplitMut }
794+
795+ #[ unstable( feature = "split_inclusive_variants" , issue = "none" ) ]
796+ fn max_items;
788797}
789798
790799iter_n ! {
@@ -806,7 +815,10 @@ iter_n! {
806815 ///
807816 /// [`rsplitn_mut`]: slice::rsplitn_mut
808817 /// [slices]: slice
809- pub struct RSplitNMut { "RSplitNMut" ; RSplitMut }
818+ pub struct RSplitNMut { inner: RSplitMut }
819+
820+ #[ unstable( feature = "split_inclusive_variants" , issue = "none" ) ]
821+ fn max_items;
810822}
811823
812824iter_n ! {
@@ -830,7 +842,10 @@ iter_n! {
830842 ///
831843 /// [`splitn_inclusive`]: slice::splitn_inclusive
832844 /// [slices]: slice
833- pub struct SplitNInclusive { "SplitNInclusive" ; SplitInclusive } : Clone
845+ pub struct SplitNInclusive { inner: SplitInclusive } : Clone
846+
847+ #[ unstable( feature = "split_inclusive_variants" , issue = "none" ) ]
848+ fn max_items;
834849}
835850
836851iter_n ! {
@@ -854,7 +869,10 @@ iter_n! {
854869 ///
855870 /// [`splitn_left_inclusive`]: slice::splitn_left_inclusive
856871 /// [slices]: slice
857- pub struct SplitNLeftInclusive { "SplitNLeftInclusive" ; SplitLeftInclusive } : Clone
872+ pub struct SplitNLeftInclusive { inner: SplitLeftInclusive } : Clone
873+
874+ #[ unstable( feature = "split_inclusive_variants" , issue = "none" ) ]
875+ fn max_items;
858876}
859877
860878iter_n ! {
@@ -878,7 +896,10 @@ iter_n! {
878896 ///
879897 /// [`rsplitn_inclusive`]: slice::rsplitn_inclusive
880898 /// [slices]: slice
881- pub struct RSplitNInclusive { "RSplitNInclusive" ; RSplitInclusive } : Clone
899+ pub struct RSplitNInclusive { inner: RSplitInclusive } : Clone
900+
901+ #[ unstable( feature = "split_inclusive_variants" , issue = "none" ) ]
902+ fn max_items;
882903}
883904
884905iter_n ! {
@@ -902,7 +923,10 @@ iter_n! {
902923 ///
903924 /// [`rsplitn_left_inclusive`]: slice::rsplitn_left_inclusive
904925 /// [slices]: slice
905- pub struct RSplitNLeftInclusive { "RSplitNLeftInclusive" ; RSplitLeftInclusive } : Clone
926+ pub struct RSplitNLeftInclusive { inner: RSplitLeftInclusive } : Clone
927+
928+ #[ unstable( feature = "split_inclusive_variants" , issue = "none" ) ]
929+ fn max_items;
906930}
907931
908932iter_n ! {
@@ -926,7 +950,10 @@ iter_n! {
926950 ///
927951 /// [`splitn_inclusive_mut`]: slice::splitn_inclusive_mut
928952 /// [slices]: slice
929- pub struct SplitNInclusiveMut { "SplitNInclusiveMut" ; SplitInclusiveMut }
953+ pub struct SplitNInclusiveMut { inner: SplitInclusiveMut }
954+
955+ #[ unstable( feature = "split_inclusive_variants" , issue = "none" ) ]
956+ fn max_items;
930957}
931958
932959iter_n ! {
@@ -950,7 +977,10 @@ iter_n! {
950977 ///
951978 /// [`splitn_left_inclusive_mut`]: slice::splitn_left_inclusive_mut
952979 /// [slices]: slice
953- pub struct SplitNLeftInclusiveMut { "SplitNLeftInclusiveMut" ; SplitLeftInclusiveMut }
980+ pub struct SplitNLeftInclusiveMut { inner: SplitLeftInclusiveMut }
981+
982+ #[ unstable( feature = "split_inclusive_variants" , issue = "none" ) ]
983+ fn max_items;
954984}
955985
956986iter_n ! {
@@ -974,7 +1004,10 @@ iter_n! {
9741004 ///
9751005 /// [`rsplitn_inclusive_mut`]: slice::rsplitn_inclusive_mut
9761006 /// [slices]: slice
977- pub struct RSplitNInclusiveMut { "RSplitNInclusiveMut" ; RSplitInclusiveMut }
1007+ pub struct RSplitNInclusiveMut { inner: RSplitInclusiveMut }
1008+
1009+ #[ unstable( feature = "split_inclusive_variants" , issue = "none" ) ]
1010+ fn max_items;
9781011}
9791012
9801013iter_n ! {
@@ -998,7 +1031,10 @@ iter_n! {
9981031 ///
9991032 /// [`rsplitn_left_inclusive_mut`]: slice::rsplitn_left_inclusive_mut
10001033 /// [slices]: slice
1001- pub struct RSplitNLeftInclusiveMut { "RSplitNLeftInclusiveMut" ; RSplitLeftInclusiveMut }
1034+ pub struct RSplitNLeftInclusiveMut { inner: RSplitLeftInclusiveMut }
1035+
1036+ #[ unstable( feature = "split_inclusive_variants" , issue = "none" ) ]
1037+ fn max_items;
10021038}
10031039
10041040/// An iterator over overlapping subslices of length `size`.
0 commit comments