File tree Expand file tree Collapse file tree 7 files changed +9
-10
lines changed Expand file tree Collapse file tree 7 files changed +9
-10
lines changed Original file line number Diff line number Diff line change 113113#![ feature( const_maybe_uninit_write) ]
114114#![ feature( const_maybe_uninit_zeroed) ]
115115#![ feature( const_pin) ]
116- #![ feature( const_ptr_read) ]
117116#![ feature( const_refs_to_cell) ]
118117#![ feature( const_size_of_val) ]
119118#![ feature( const_waker) ]
Original file line number Diff line number Diff line change @@ -2260,7 +2260,7 @@ extern "rust-intrinsic" {
22602260 /// This intrinsic can *only* be called where the pointer is a local without
22612261 /// projections (`read_via_copy(ptr)`, not `read_via_copy(*ptr)`) so that it
22622262 /// trivially obeys runtime-MIR rules about derefs in operands.
2263- #[ rustc_const_unstable ( feature = "const_ptr_read" , issue = "80377 " ) ]
2263+ #[ rustc_const_stable ( feature = "const_ptr_read" , since = "CURRENT_RUSTC_VERSION " ) ]
22642264 #[ rustc_nounwind]
22652265 pub fn read_via_copy < T > ( ptr : * const T ) -> T ;
22662266
Original file line number Diff line number Diff line change 140140#![ feature( const_pointer_is_aligned) ]
141141#![ feature( const_ptr_as_ref) ]
142142#![ feature( const_ptr_is_null) ]
143- #![ feature( const_ptr_read) ]
144143#![ feature( const_ptr_sub_ptr) ]
145144#![ feature( const_ptr_write) ]
146145#![ feature( const_raw_ptr_comparison) ]
Original file line number Diff line number Diff line change @@ -1195,7 +1195,7 @@ impl<T: ?Sized> *const T {
11951195 ///
11961196 /// [`ptr::read`]: crate::ptr::read()
11971197 #[ stable( feature = "pointer_methods" , since = "1.26.0" ) ]
1198- #[ rustc_const_unstable ( feature = "const_ptr_read" , issue = "80377 " ) ]
1198+ #[ rustc_const_stable ( feature = "const_ptr_read" , since = "CURRENT_RUSTC_VERSION " ) ]
11991199 #[ inline]
12001200 #[ cfg_attr( miri, track_caller) ] // even without panics, this helps for Miri backtraces
12011201 pub const unsafe fn read ( self ) -> T
@@ -1236,7 +1236,7 @@ impl<T: ?Sized> *const T {
12361236 ///
12371237 /// [`ptr::read_unaligned`]: crate::ptr::read_unaligned()
12381238 #[ stable( feature = "pointer_methods" , since = "1.26.0" ) ]
1239- #[ rustc_const_unstable ( feature = "const_ptr_read" , issue = "80377 " ) ]
1239+ #[ rustc_const_stable ( feature = "const_ptr_read" , since = "CURRENT_RUSTC_VERSION " ) ]
12401240 #[ inline]
12411241 #[ cfg_attr( miri, track_caller) ] // even without panics, this helps for Miri backtraces
12421242 pub const unsafe fn read_unaligned ( self ) -> T
Original file line number Diff line number Diff line change @@ -1133,7 +1133,8 @@ pub const unsafe fn replace<T>(dst: *mut T, mut src: T) -> T {
11331133/// [valid]: self#safety
11341134#[ inline]
11351135#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1136- #[ rustc_const_unstable( feature = "const_ptr_read" , issue = "80377" ) ]
1136+ #[ rustc_const_stable( feature = "const_ptr_read" , since = "CURRENT_RUSTC_VERSION" ) ]
1137+ #[ rustc_allow_const_fn_unstable( const_mut_refs, const_maybe_uninit_as_mut_ptr) ]
11371138#[ cfg_attr( miri, track_caller) ] // even without panics, this helps for Miri backtraces
11381139pub const unsafe fn read < T > ( src : * const T ) -> T {
11391140 // It would be semantically correct to implement this via `copy_nonoverlapping`
@@ -1249,7 +1250,8 @@ pub const unsafe fn read<T>(src: *const T) -> T {
12491250/// ```
12501251#[ inline]
12511252#[ stable( feature = "ptr_unaligned" , since = "1.17.0" ) ]
1252- #[ rustc_const_unstable( feature = "const_ptr_read" , issue = "80377" ) ]
1253+ #[ rustc_const_stable( feature = "const_ptr_read" , since = "CURRENT_RUSTC_VERSION" ) ]
1254+ #[ rustc_allow_const_fn_unstable( const_mut_refs, const_maybe_uninit_as_mut_ptr) ]
12531255#[ cfg_attr( miri, track_caller) ] // even without panics, this helps for Miri backtraces
12541256pub const unsafe fn read_unaligned < T > ( src : * const T ) -> T {
12551257 let mut tmp = MaybeUninit :: < T > :: uninit ( ) ;
Original file line number Diff line number Diff line change @@ -1305,7 +1305,7 @@ impl<T: ?Sized> *mut T {
13051305 ///
13061306 /// [`ptr::read`]: crate::ptr::read()
13071307 #[ stable( feature = "pointer_methods" , since = "1.26.0" ) ]
1308- #[ rustc_const_unstable ( feature = "const_ptr_read" , issue = "80377 " ) ]
1308+ #[ rustc_const_stable ( feature = "const_ptr_read" , since = "CURRENT_RUSTC_VERSION " ) ]
13091309 #[ inline( always) ]
13101310 #[ cfg_attr( miri, track_caller) ] // even without panics, this helps for Miri backtraces
13111311 pub const unsafe fn read ( self ) -> T
@@ -1346,7 +1346,7 @@ impl<T: ?Sized> *mut T {
13461346 ///
13471347 /// [`ptr::read_unaligned`]: crate::ptr::read_unaligned()
13481348 #[ stable( feature = "pointer_methods" , since = "1.26.0" ) ]
1349- #[ rustc_const_unstable ( feature = "const_ptr_read" , issue = "80377 " ) ]
1349+ #[ rustc_const_stable ( feature = "const_ptr_read" , since = "CURRENT_RUSTC_VERSION " ) ]
13501350 #[ inline( always) ]
13511351 #[ cfg_attr( miri, track_caller) ] // even without panics, this helps for Miri backtraces
13521352 pub const unsafe fn read_unaligned ( self ) -> T
Original file line number Diff line number Diff line change 1818#![ feature( const_pointer_byte_offsets) ]
1919#![ feature( const_pointer_is_aligned) ]
2020#![ feature( const_ptr_as_ref) ]
21- #![ feature( const_ptr_read) ]
2221#![ feature( const_ptr_write) ]
2322#![ feature( const_trait_impl) ]
2423#![ feature( const_likely) ]
You can’t perform that action at this time.
0 commit comments