@@ -563,10 +563,11 @@ impl<'a, I: ExactSizeIterator + ?Sized> ExactSizeIterator for &'a mut I {}
563
563
/// implement the trait can be generated by the `sum` method. Like
564
564
/// `FromIterator` this trait should rarely be called directly and instead
565
565
/// interacted with through `Iterator::sum`.
566
- #[ unstable ( feature = "iter_arith_traits" , issue = "34529 " ) ]
566
+ #[ stable ( feature = "iter_arith_traits" , since = "1.12.0 " ) ]
567
567
pub trait Sum < A = Self > : Sized {
568
568
/// Method which takes an iterator and generates `Self` from the elements by
569
569
/// "summing up" the items.
570
+ #[ stable( feature = "iter_arith_traits" , since = "1.12.0" ) ]
570
571
fn sum < I : Iterator < Item =A > > ( iter : I ) -> Self ;
571
572
}
572
573
@@ -577,16 +578,17 @@ pub trait Sum<A = Self>: Sized {
577
578
/// which implement the trait can be generated by the `product` method. Like
578
579
/// `FromIterator` this trait should rarely be called directly and instead
579
580
/// interacted with through `Iterator::product`.
580
- #[ unstable ( feature = "iter_arith_traits" , issue = "34529 " ) ]
581
+ #[ stable ( feature = "iter_arith_traits" , since = "1.12.0 " ) ]
581
582
pub trait Product < A = Self > : Sized {
582
583
/// Method which takes an iterator and generates `Self` from the elements by
583
584
/// multiplying the items.
585
+ #[ stable( feature = "iter_arith_traits" , since = "1.12.0" ) ]
584
586
fn product < I : Iterator < Item =A > > ( iter : I ) -> Self ;
585
587
}
586
588
587
589
macro_rules! integer_sum_product {
588
590
( $( $a: ident) * ) => ( $(
589
- #[ unstable ( feature = "iter_arith_traits" , issue = "34529 " ) ]
591
+ #[ stable ( feature = "iter_arith_traits" , since = "1.12.0 " ) ]
590
592
impl Sum for $a {
591
593
fn sum<I : Iterator <Item =$a>>( iter: I ) -> $a {
592
594
iter. fold( 0 , |a, b| {
@@ -595,7 +597,7 @@ macro_rules! integer_sum_product {
595
597
}
596
598
}
597
599
598
- #[ unstable ( feature = "iter_arith_traits" , issue = "34529 " ) ]
600
+ #[ stable ( feature = "iter_arith_traits" , since = "1.12.0 " ) ]
599
601
impl Product for $a {
600
602
fn product<I : Iterator <Item =$a>>( iter: I ) -> $a {
601
603
iter. fold( 1 , |a, b| {
@@ -604,7 +606,7 @@ macro_rules! integer_sum_product {
604
606
}
605
607
}
606
608
607
- #[ unstable ( feature = "iter_arith_traits" , issue = "34529 " ) ]
609
+ #[ stable ( feature = "iter_arith_traits" , since = "1.12.0 " ) ]
608
610
impl <' a> Sum <& ' a $a> for $a {
609
611
fn sum<I : Iterator <Item =& ' a $a>>( iter: I ) -> $a {
610
612
iter. fold( 0 , |a, b| {
@@ -613,7 +615,7 @@ macro_rules! integer_sum_product {
613
615
}
614
616
}
615
617
616
- #[ unstable ( feature = "iter_arith_traits" , issue = "34529 " ) ]
618
+ #[ stable ( feature = "iter_arith_traits" , since = "1.12.0 " ) ]
617
619
impl <' a> Product <& ' a $a> for $a {
618
620
fn product<I : Iterator <Item =& ' a $a>>( iter: I ) -> $a {
619
621
iter. fold( 1 , |a, b| {
@@ -626,28 +628,28 @@ macro_rules! integer_sum_product {
626
628
627
629
macro_rules! float_sum_product {
628
630
( $( $a: ident) * ) => ( $(
629
- #[ unstable ( feature = "iter_arith_traits" , issue = "34529 " ) ]
631
+ #[ stable ( feature = "iter_arith_traits" , since = "1.12.0 " ) ]
630
632
impl Sum for $a {
631
633
fn sum<I : Iterator <Item =$a>>( iter: I ) -> $a {
632
634
iter. fold( 0.0 , |a, b| a + b)
633
635
}
634
636
}
635
637
636
- #[ unstable ( feature = "iter_arith_traits" , issue = "34529 " ) ]
638
+ #[ stable ( feature = "iter_arith_traits" , since = "1.12.0 " ) ]
637
639
impl Product for $a {
638
640
fn product<I : Iterator <Item =$a>>( iter: I ) -> $a {
639
641
iter. fold( 1.0 , |a, b| a * b)
640
642
}
641
643
}
642
644
643
- #[ unstable ( feature = "iter_arith_traits" , issue = "34529 " ) ]
645
+ #[ stable ( feature = "iter_arith_traits" , since = "1.12.0 " ) ]
644
646
impl <' a> Sum <& ' a $a> for $a {
645
647
fn sum<I : Iterator <Item =& ' a $a>>( iter: I ) -> $a {
646
648
iter. fold( 0.0 , |a, b| a + * b)
647
649
}
648
650
}
649
651
650
- #[ unstable ( feature = "iter_arith_traits" , issue = "34529 " ) ]
652
+ #[ stable ( feature = "iter_arith_traits" , since = "1.12.0 " ) ]
651
653
impl <' a> Product <& ' a $a> for $a {
652
654
fn product<I : Iterator <Item =& ' a $a>>( iter: I ) -> $a {
653
655
iter. fold( 1.0 , |a, b| a * * b)
0 commit comments