Skip to content

Commit 53bb68e

Browse files
committed
Auto merge of rust-lang#89551 - jhpratt:stabilize-const_raw_ptr_deref, r=oli-obk
Stabilize `const_raw_ptr_deref` for `*const T` This stabilizes dereferencing immutable raw pointers in const contexts. It does not stabilize `*mut T` dereferencing. This is behind the same feature gate as mutable references. closes rust-lang#51911
2 parents b2d6b40 + 83307df commit 53bb68e

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

core/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@
156156
#![feature(const_impl_trait)]
157157
#![feature(const_mut_refs)]
158158
#![feature(const_precise_live_drops)]
159-
#![feature(const_raw_ptr_deref)]
159+
#![cfg_attr(bootstrap, feature(const_raw_ptr_deref))]
160160
#![feature(const_refs_to_cell)]
161161
#![feature(decl_macro)]
162162
#![feature(doc_cfg)]

core/tests/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
#![feature(const_mut_refs)]
5757
#![feature(const_pin)]
5858
#![feature(const_slice_from_raw_parts)]
59-
#![feature(const_raw_ptr_deref)]
59+
#![cfg_attr(bootstrap, feature(const_raw_ptr_deref))]
6060
#![feature(never_type)]
6161
#![feature(unwrap_infallible)]
6262
#![feature(result_into_ok_or_err)]

std/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,8 @@
264264
#![feature(const_ipv4)]
265265
#![feature(const_ipv6)]
266266
#![feature(const_option)]
267-
#![feature(const_raw_ptr_deref)]
267+
#![cfg_attr(bootstrap, feature(const_raw_ptr_deref))]
268+
#![cfg_attr(not(bootstrap), feature(const_mut_refs))]
268269
#![feature(const_socketaddr)]
269270
#![feature(const_trait_impl)]
270271
#![feature(container_error_extra)]

0 commit comments

Comments
 (0)