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 113
113
#![ feature( const_maybe_uninit_write) ]
114
114
#![ feature( const_maybe_uninit_zeroed) ]
115
115
#![ feature( const_pin) ]
116
- #![ feature( const_ptr_read) ]
117
116
#![ feature( const_refs_to_cell) ]
118
117
#![ feature( const_size_of_val) ]
119
118
#![ feature( const_waker) ]
Original file line number Diff line number Diff line change @@ -2260,7 +2260,7 @@ extern "rust-intrinsic" {
2260
2260
/// This intrinsic can *only* be called where the pointer is a local without
2261
2261
/// projections (`read_via_copy(ptr)`, not `read_via_copy(*ptr)`) so that it
2262
2262
/// 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 " ) ]
2264
2264
#[ rustc_nounwind]
2265
2265
pub fn read_via_copy < T > ( ptr : * const T ) -> T ;
2266
2266
Original file line number Diff line number Diff line change 140
140
#![ feature( const_pointer_is_aligned) ]
141
141
#![ feature( const_ptr_as_ref) ]
142
142
#![ feature( const_ptr_is_null) ]
143
- #![ feature( const_ptr_read) ]
144
143
#![ feature( const_ptr_sub_ptr) ]
145
144
#![ feature( const_ptr_write) ]
146
145
#![ feature( const_raw_ptr_comparison) ]
Original file line number Diff line number Diff line change @@ -1195,7 +1195,7 @@ impl<T: ?Sized> *const T {
1195
1195
///
1196
1196
/// [`ptr::read`]: crate::ptr::read()
1197
1197
#[ 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 " ) ]
1199
1199
#[ inline]
1200
1200
#[ cfg_attr( miri, track_caller) ] // even without panics, this helps for Miri backtraces
1201
1201
pub const unsafe fn read ( self ) -> T
@@ -1236,7 +1236,7 @@ impl<T: ?Sized> *const T {
1236
1236
///
1237
1237
/// [`ptr::read_unaligned`]: crate::ptr::read_unaligned()
1238
1238
#[ 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 " ) ]
1240
1240
#[ inline]
1241
1241
#[ cfg_attr( miri, track_caller) ] // even without panics, this helps for Miri backtraces
1242
1242
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 {
1133
1133
/// [valid]: self#safety
1134
1134
#[ inline]
1135
1135
#[ 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) ]
1137
1138
#[ cfg_attr( miri, track_caller) ] // even without panics, this helps for Miri backtraces
1138
1139
pub const unsafe fn read < T > ( src : * const T ) -> T {
1139
1140
// 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 {
1249
1250
/// ```
1250
1251
#[ inline]
1251
1252
#[ 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) ]
1253
1255
#[ cfg_attr( miri, track_caller) ] // even without panics, this helps for Miri backtraces
1254
1256
pub const unsafe fn read_unaligned < T > ( src : * const T ) -> T {
1255
1257
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 {
1305
1305
///
1306
1306
/// [`ptr::read`]: crate::ptr::read()
1307
1307
#[ 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 " ) ]
1309
1309
#[ inline( always) ]
1310
1310
#[ cfg_attr( miri, track_caller) ] // even without panics, this helps for Miri backtraces
1311
1311
pub const unsafe fn read ( self ) -> T
@@ -1346,7 +1346,7 @@ impl<T: ?Sized> *mut T {
1346
1346
///
1347
1347
/// [`ptr::read_unaligned`]: crate::ptr::read_unaligned()
1348
1348
#[ 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 " ) ]
1350
1350
#[ inline( always) ]
1351
1351
#[ cfg_attr( miri, track_caller) ] // even without panics, this helps for Miri backtraces
1352
1352
pub const unsafe fn read_unaligned ( self ) -> T
Original file line number Diff line number Diff line change 18
18
#![ feature( const_pointer_byte_offsets) ]
19
19
#![ feature( const_pointer_is_aligned) ]
20
20
#![ feature( const_ptr_as_ref) ]
21
- #![ feature( const_ptr_read) ]
22
21
#![ feature( const_ptr_write) ]
23
22
#![ feature( const_trait_impl) ]
24
23
#![ feature( const_likely) ]
You can’t perform that action at this time.
0 commit comments