@@ -665,7 +665,6 @@ impl<T> MaybeUninit<T> {
665665 /// ### Correct usage of this method:
666666 ///
667667 /// ```rust
668- /// #![feature(maybe_uninit_ref)]
669668 /// use std::mem::MaybeUninit;
670669 ///
671670 /// let mut x = MaybeUninit::<Vec<u32>>::uninit();
@@ -683,7 +682,6 @@ impl<T> MaybeUninit<T> {
683682 /// ### *Incorrect* usages of this method:
684683 ///
685684 /// ```rust,no_run
686- /// #![feature(maybe_uninit_ref)]
687685 /// use std::mem::MaybeUninit;
688686 ///
689687 /// let x = MaybeUninit::<Vec<u32>>::uninit();
@@ -692,7 +690,6 @@ impl<T> MaybeUninit<T> {
692690 /// ```
693691 ///
694692 /// ```rust,no_run
695- /// #![feature(maybe_uninit_ref)]
696693 /// use std::{cell::Cell, mem::MaybeUninit};
697694 ///
698695 /// let b = MaybeUninit::<Cell<bool>>::uninit();
@@ -703,7 +700,7 @@ impl<T> MaybeUninit<T> {
703700 /// // Reference to an uninitialized `Cell<bool>`: UB!
704701 /// }
705702 /// ```
706- #[ unstable ( feature = "maybe_uninit_ref" , issue = "63568 " ) ]
703+ #[ stable ( feature = "maybe_uninit_ref" , since = "1.55.0 " ) ]
707704 #[ rustc_const_unstable( feature = "const_maybe_uninit_assume_init" , issue = "none" ) ]
708705 #[ inline( always) ]
709706 pub const unsafe fn assume_init_ref ( & self ) -> & T {
@@ -733,7 +730,6 @@ impl<T> MaybeUninit<T> {
733730 /// ### Correct usage of this method:
734731 ///
735732 /// ```rust
736- /// #![feature(maybe_uninit_ref)]
737733 /// use std::mem::MaybeUninit;
738734 ///
739735 /// # unsafe extern "C" fn initialize_buffer(buf: *mut [u8; 1024]) { *buf = [0; 1024] }
@@ -769,7 +765,6 @@ impl<T> MaybeUninit<T> {
769765 /// You cannot use `.assume_init_mut()` to initialize a value:
770766 ///
771767 /// ```rust,no_run
772- /// #![feature(maybe_uninit_ref)]
773768 /// use std::mem::MaybeUninit;
774769 ///
775770 /// let mut b = MaybeUninit::<bool>::uninit();
@@ -785,7 +780,6 @@ impl<T> MaybeUninit<T> {
785780 /// [`Read`]: https://doc.rust-lang.org/std/io/trait.Read.html
786781 ///
787782 /// ```rust,no_run
788- /// #![feature(maybe_uninit_ref)]
789783 /// use std::{io, mem::MaybeUninit};
790784 ///
791785 /// fn read_chunk (reader: &'_ mut dyn io::Read) -> io::Result<[u8; 64]>
@@ -802,7 +796,6 @@ impl<T> MaybeUninit<T> {
802796 /// Nor can you use direct field access to do field-by-field gradual initialization:
803797 ///
804798 /// ```rust,no_run
805- /// #![feature(maybe_uninit_ref)]
806799 /// use std::{mem::MaybeUninit, ptr};
807800 ///
808801 /// struct Foo {
@@ -823,10 +816,7 @@ impl<T> MaybeUninit<T> {
823816 /// foo.assume_init()
824817 /// };
825818 /// ```
826- // FIXME(#76092): We currently rely on the above being incorrect, i.e., we have references
827- // to uninitialized data (e.g., in `libcore/fmt/float.rs`). We should make
828- // a final decision about the rules before stabilization.
829- #[ unstable( feature = "maybe_uninit_ref" , issue = "63568" ) ]
819+ #[ stable( feature = "maybe_uninit_ref" , since = "1.55.0" ) ]
830820 #[ rustc_const_unstable( feature = "const_maybe_uninit_assume_init" , issue = "none" ) ]
831821 #[ inline( always) ]
832822 pub const unsafe fn assume_init_mut ( & mut self ) -> & mut T {
0 commit comments