File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed
tests/ui/rfcs/rfc-1789-as-cell Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -698,14 +698,14 @@ impl<T, const N: usize> Cell<[T; N]> {
698
698
/// # Examples
699
699
///
700
700
/// ```
701
- /// #![feature(as_array_of_cells)]
702
701
/// use std::cell::Cell;
703
702
///
704
703
/// let mut array: [i32; 3] = [1, 2, 3];
705
704
/// let cell_array: &Cell<[i32; 3]> = Cell::from_mut(&mut array);
706
705
/// let array_cell: &[Cell<i32>; 3] = cell_array.as_array_of_cells();
707
706
/// ```
708
- #[ unstable( feature = "as_array_of_cells" , issue = "88248" ) ]
707
+ #[ stable( feature = "as_array_of_cells" , since = "CURRENT_RUSTC_VERSION" ) ]
708
+ #[ rustc_const_stable( feature = "as_array_of_cells" , since = "CURRENT_RUSTC_VERSION" ) ]
709
709
pub const fn as_array_of_cells ( & self ) -> & [ Cell < T > ; N ] {
710
710
// SAFETY: `Cell<T>` has the same memory layout as `T`.
711
711
unsafe { & * ( self as * const Cell < [ T ; N ] > as * const [ Cell < T > ; N ] ) }
Original file line number Diff line number Diff line change 1
1
//@ run-pass
2
2
3
- #![ feature( as_array_of_cells) ]
4
-
5
3
use std:: cell:: Cell ;
6
4
7
5
fn main ( ) {
You can’t perform that action at this time.
0 commit comments