@@ -563,10 +563,11 @@ impl<'a, I: ExactSizeIterator + ?Sized> ExactSizeIterator for &'a mut I {}
563563/// implement the trait can be generated by the `sum` method. Like
564564/// `FromIterator` this trait should rarely be called directly and instead
565565/// interacted with through `Iterator::sum`.
566- #[ unstable ( feature = "iter_arith_traits" , issue = "34529 " ) ]
566+ #[ stable ( feature = "iter_arith_traits" , since = "1.12.0 " ) ]
567567pub trait Sum < A = Self > : Sized {
568568 /// Method which takes an iterator and generates `Self` from the elements by
569569 /// "summing up" the items.
570+ #[ stable( feature = "iter_arith_traits" , since = "1.12.0" ) ]
570571 fn sum < I : Iterator < Item =A > > ( iter : I ) -> Self ;
571572}
572573
@@ -577,16 +578,17 @@ pub trait Sum<A = Self>: Sized {
577578/// which implement the trait can be generated by the `product` method. Like
578579/// `FromIterator` this trait should rarely be called directly and instead
579580/// interacted with through `Iterator::product`.
580- #[ unstable ( feature = "iter_arith_traits" , issue = "34529 " ) ]
581+ #[ stable ( feature = "iter_arith_traits" , since = "1.12.0 " ) ]
581582pub trait Product < A = Self > : Sized {
582583 /// Method which takes an iterator and generates `Self` from the elements by
583584 /// multiplying the items.
585+ #[ stable( feature = "iter_arith_traits" , since = "1.12.0" ) ]
584586 fn product < I : Iterator < Item =A > > ( iter : I ) -> Self ;
585587}
586588
587589macro_rules! integer_sum_product {
588590 ( $( $a: ident) * ) => ( $(
589- #[ unstable ( feature = "iter_arith_traits" , issue = "34529 " ) ]
591+ #[ stable ( feature = "iter_arith_traits" , since = "1.12.0 " ) ]
590592 impl Sum for $a {
591593 fn sum<I : Iterator <Item =$a>>( iter: I ) -> $a {
592594 iter. fold( 0 , |a, b| {
@@ -595,7 +597,7 @@ macro_rules! integer_sum_product {
595597 }
596598 }
597599
598- #[ unstable ( feature = "iter_arith_traits" , issue = "34529 " ) ]
600+ #[ stable ( feature = "iter_arith_traits" , since = "1.12.0 " ) ]
599601 impl Product for $a {
600602 fn product<I : Iterator <Item =$a>>( iter: I ) -> $a {
601603 iter. fold( 1 , |a, b| {
@@ -604,7 +606,7 @@ macro_rules! integer_sum_product {
604606 }
605607 }
606608
607- #[ unstable ( feature = "iter_arith_traits" , issue = "34529 " ) ]
609+ #[ stable ( feature = "iter_arith_traits" , since = "1.12.0 " ) ]
608610 impl <' a> Sum <& ' a $a> for $a {
609611 fn sum<I : Iterator <Item =& ' a $a>>( iter: I ) -> $a {
610612 iter. fold( 0 , |a, b| {
@@ -613,7 +615,7 @@ macro_rules! integer_sum_product {
613615 }
614616 }
615617
616- #[ unstable ( feature = "iter_arith_traits" , issue = "34529 " ) ]
618+ #[ stable ( feature = "iter_arith_traits" , since = "1.12.0 " ) ]
617619 impl <' a> Product <& ' a $a> for $a {
618620 fn product<I : Iterator <Item =& ' a $a>>( iter: I ) -> $a {
619621 iter. fold( 1 , |a, b| {
@@ -626,28 +628,28 @@ macro_rules! integer_sum_product {
626628
627629macro_rules! float_sum_product {
628630 ( $( $a: ident) * ) => ( $(
629- #[ unstable ( feature = "iter_arith_traits" , issue = "34529 " ) ]
631+ #[ stable ( feature = "iter_arith_traits" , since = "1.12.0 " ) ]
630632 impl Sum for $a {
631633 fn sum<I : Iterator <Item =$a>>( iter: I ) -> $a {
632634 iter. fold( 0.0 , |a, b| a + b)
633635 }
634636 }
635637
636- #[ unstable ( feature = "iter_arith_traits" , issue = "34529 " ) ]
638+ #[ stable ( feature = "iter_arith_traits" , since = "1.12.0 " ) ]
637639 impl Product for $a {
638640 fn product<I : Iterator <Item =$a>>( iter: I ) -> $a {
639641 iter. fold( 1.0 , |a, b| a * b)
640642 }
641643 }
642644
643- #[ unstable ( feature = "iter_arith_traits" , issue = "34529 " ) ]
645+ #[ stable ( feature = "iter_arith_traits" , since = "1.12.0 " ) ]
644646 impl <' a> Sum <& ' a $a> for $a {
645647 fn sum<I : Iterator <Item =& ' a $a>>( iter: I ) -> $a {
646648 iter. fold( 0.0 , |a, b| a + * b)
647649 }
648650 }
649651
650- #[ unstable ( feature = "iter_arith_traits" , issue = "34529 " ) ]
652+ #[ stable ( feature = "iter_arith_traits" , since = "1.12.0 " ) ]
651653 impl <' a> Product <& ' a $a> for $a {
652654 fn product<I : Iterator <Item =& ' a $a>>( iter: I ) -> $a {
653655 iter. fold( 1.0 , |a, b| a * * b)
0 commit comments