This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -725,8 +725,9 @@ impl<T: ?Sized> *const T {
725725 ///
726726 /// [`ptr::read`]: crate::ptr::read()
727727 #[ stable( feature = "pointer_methods" , since = "1.26.0" ) ]
728+ #[ rustc_const_unstable( feature = "const_ptr_read" , issue = "none" ) ]
728729 #[ inline]
729- pub unsafe fn read ( self ) -> T
730+ pub const unsafe fn read ( self ) -> T
730731 where
731732 T : Sized ,
732733 {
@@ -763,8 +764,9 @@ impl<T: ?Sized> *const T {
763764 ///
764765 /// [`ptr::read_unaligned`]: crate::ptr::read_unaligned()
765766 #[ stable( feature = "pointer_methods" , since = "1.26.0" ) ]
767+ #[ rustc_const_unstable( feature = "const_ptr_read" , issue = "none" ) ]
766768 #[ inline]
767- pub unsafe fn read_unaligned ( self ) -> T
769+ pub const unsafe fn read_unaligned ( self ) -> T
768770 where
769771 T : Sized ,
770772 {
Original file line number Diff line number Diff line change @@ -832,8 +832,9 @@ impl<T: ?Sized> *mut T {
832832 ///
833833 /// [`ptr::read`]: crate::ptr::read()
834834 #[ stable( feature = "pointer_methods" , since = "1.26.0" ) ]
835+ #[ rustc_const_unstable( feature = "const_ptr_read" , issue = "none" ) ]
835836 #[ inline]
836- pub unsafe fn read ( self ) -> T
837+ pub const unsafe fn read ( self ) -> T
837838 where
838839 T : Sized ,
839840 {
@@ -870,8 +871,9 @@ impl<T: ?Sized> *mut T {
870871 ///
871872 /// [`ptr::read_unaligned`]: crate::ptr::read_unaligned()
872873 #[ stable( feature = "pointer_methods" , since = "1.26.0" ) ]
874+ #[ rustc_const_unstable( feature = "const_ptr_read" , issue = "none" ) ]
873875 #[ inline]
874- pub unsafe fn read_unaligned ( self ) -> T
876+ pub const unsafe fn read_unaligned ( self ) -> T
875877 where
876878 T : Sized ,
877879 {
You can’t perform that action at this time.
0 commit comments