@@ -592,8 +592,6 @@ impl<T, const N: usize> [T; N] {
592
592
/// # Example
593
593
///
594
594
/// ```
595
- /// #![feature(array_methods)]
596
- ///
597
595
/// let floats = [3.1, 2.7, -1.0];
598
596
/// let float_refs: [&f64; 3] = floats.each_ref();
599
597
/// assert_eq!(float_refs, [&3.1, &2.7, &-1.0]);
@@ -604,16 +602,14 @@ impl<T, const N: usize> [T; N] {
604
602
/// array if its elements are not [`Copy`].
605
603
///
606
604
/// ```
607
- /// #![feature(array_methods)]
608
- ///
609
605
/// let strings = ["Ferris".to_string(), "♥".to_string(), "Rust".to_string()];
610
606
/// let is_ascii = strings.each_ref().map(|s| s.is_ascii());
611
607
/// assert_eq!(is_ascii, [true, false, true]);
612
608
///
613
609
/// // We can still access the original array: it has not been moved.
614
610
/// assert_eq!(strings.len(), 3);
615
611
/// ```
616
- #[ unstable ( feature = "array_methods" , issue = "76118 " ) ]
612
+ #[ stable ( feature = "array_methods" , since = "CURRENT_RUSTC_VERSION " ) ]
617
613
pub fn each_ref ( & self ) -> [ & T ; N ] {
618
614
// SAFETY: we know for certain that this iterator will yield exactly `N`
619
615
// items.
@@ -627,15 +623,14 @@ impl<T, const N: usize> [T; N] {
627
623
/// # Example
628
624
///
629
625
/// ```
630
- /// #![feature(array_methods)]
631
626
///
632
627
/// let mut floats = [3.1, 2.7, -1.0];
633
628
/// let float_refs: [&mut f64; 3] = floats.each_mut();
634
629
/// *float_refs[0] = 0.0;
635
630
/// assert_eq!(float_refs, [&mut 0.0, &mut 2.7, &mut -1.0]);
636
631
/// assert_eq!(floats, [0.0, 2.7, -1.0]);
637
632
/// ```
638
- #[ unstable ( feature = "array_methods" , issue = "76118 " ) ]
633
+ #[ stable ( feature = "array_methods" , since = "CURRENT_RUSTC_VERSION " ) ]
639
634
pub fn each_mut ( & mut self ) -> [ & mut T ; N ] {
640
635
// SAFETY: we know for certain that this iterator will yield exactly `N`
641
636
// items.
0 commit comments