File tree 2 files changed +8
-4
lines changed
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 {
725
725
///
726
726
/// [`ptr::read`]: crate::ptr::read()
727
727
#[ stable( feature = "pointer_methods" , since = "1.26.0" ) ]
728
+ #[ rustc_const_unstable( feature = "const_ptr_read" , issue = "none" ) ]
728
729
#[ inline]
729
- pub unsafe fn read ( self ) -> T
730
+ pub const unsafe fn read ( self ) -> T
730
731
where
731
732
T : Sized ,
732
733
{
@@ -763,8 +764,9 @@ impl<T: ?Sized> *const T {
763
764
///
764
765
/// [`ptr::read_unaligned`]: crate::ptr::read_unaligned()
765
766
#[ stable( feature = "pointer_methods" , since = "1.26.0" ) ]
767
+ #[ rustc_const_unstable( feature = "const_ptr_read" , issue = "none" ) ]
766
768
#[ inline]
767
- pub unsafe fn read_unaligned ( self ) -> T
769
+ pub const unsafe fn read_unaligned ( self ) -> T
768
770
where
769
771
T : Sized ,
770
772
{
Original file line number Diff line number Diff line change @@ -832,8 +832,9 @@ impl<T: ?Sized> *mut T {
832
832
///
833
833
/// [`ptr::read`]: crate::ptr::read()
834
834
#[ stable( feature = "pointer_methods" , since = "1.26.0" ) ]
835
+ #[ rustc_const_unstable( feature = "const_ptr_read" , issue = "none" ) ]
835
836
#[ inline]
836
- pub unsafe fn read ( self ) -> T
837
+ pub const unsafe fn read ( self ) -> T
837
838
where
838
839
T : Sized ,
839
840
{
@@ -870,8 +871,9 @@ impl<T: ?Sized> *mut T {
870
871
///
871
872
/// [`ptr::read_unaligned`]: crate::ptr::read_unaligned()
872
873
#[ stable( feature = "pointer_methods" , since = "1.26.0" ) ]
874
+ #[ rustc_const_unstable( feature = "const_ptr_read" , issue = "none" ) ]
873
875
#[ inline]
874
- pub unsafe fn read_unaligned ( self ) -> T
876
+ pub const unsafe fn read_unaligned ( self ) -> T
875
877
where
876
878
T : Sized ,
877
879
{
You can’t perform that action at this time.
0 commit comments