@@ -559,8 +559,6 @@ impl<T, const N: usize> [T; N] {
559
559
/// # Example
560
560
///
561
561
/// ```
562
- /// #![feature(array_methods)]
563
- ///
564
562
/// let floats = [3.1, 2.7, -1.0];
565
563
/// let float_refs: [&f64; 3] = floats.each_ref();
566
564
/// assert_eq!(float_refs, [&3.1, &2.7, &-1.0]);
@@ -571,16 +569,14 @@ impl<T, const N: usize> [T; N] {
571
569
/// array if its elements are not [`Copy`].
572
570
///
573
571
/// ```
574
- /// #![feature(array_methods)]
575
- ///
576
572
/// let strings = ["Ferris".to_string(), "♥".to_string(), "Rust".to_string()];
577
573
/// let is_ascii = strings.each_ref().map(|s| s.is_ascii());
578
574
/// assert_eq!(is_ascii, [true, false, true]);
579
575
///
580
576
/// // We can still access the original array: it has not been moved.
581
577
/// assert_eq!(strings.len(), 3);
582
578
/// ```
583
- #[ unstable ( feature = "array_methods" , issue = "76118 " ) ]
579
+ #[ stable ( feature = "array_methods" , since = "CURRENT_RUSTC_VERSION " ) ]
584
580
pub fn each_ref ( & self ) -> [ & T ; N ] {
585
581
from_trusted_iterator ( self . iter ( ) )
586
582
}
@@ -592,15 +588,14 @@ impl<T, const N: usize> [T; N] {
592
588
/// # Example
593
589
///
594
590
/// ```
595
- /// #![feature(array_methods)]
596
591
///
597
592
/// let mut floats = [3.1, 2.7, -1.0];
598
593
/// let float_refs: [&mut f64; 3] = floats.each_mut();
599
594
/// *float_refs[0] = 0.0;
600
595
/// assert_eq!(float_refs, [&mut 0.0, &mut 2.7, &mut -1.0]);
601
596
/// assert_eq!(floats, [0.0, 2.7, -1.0]);
602
597
/// ```
603
- #[ unstable ( feature = "array_methods" , issue = "76118 " ) ]
598
+ #[ stable ( feature = "array_methods" , since = "CURRENT_RUSTC_VERSION " ) ]
604
599
pub fn each_mut ( & mut self ) -> [ & mut T ; N ] {
605
600
from_trusted_iterator ( self . iter_mut ( ) )
606
601
}
0 commit comments