diff --git a/alloc/src/lib.rs b/alloc/src/lib.rs index 7aaa4e73df72c..a67ea75825de3 100644 --- a/alloc/src/lib.rs +++ b/alloc/src/lib.rs @@ -164,13 +164,13 @@ // // Language features: // tidy-alphabetical-start +#![cfg_attr(bootstrap, feature(const_mut_refs))] #![cfg_attr(not(test), feature(coroutine_trait))] #![cfg_attr(test, feature(panic_update_hook))] #![cfg_attr(test, feature(test))] #![feature(allocator_internals)] #![feature(allow_internal_unstable)] #![feature(cfg_sanitize)] -#![feature(const_mut_refs)] #![feature(const_precise_live_drops)] #![feature(const_ptr_write)] #![feature(const_try)] diff --git a/alloc/tests/lib.rs b/alloc/tests/lib.rs index c5c6a122cfec8..ffc9a233b665d 100644 --- a/alloc/tests/lib.rs +++ b/alloc/tests/lib.rs @@ -6,7 +6,7 @@ #![feature(cow_is_borrowed)] #![feature(const_cow_is_borrowed)] #![feature(const_heap)] -#![feature(const_mut_refs)] +#![cfg_attr(bootstrap, feature(const_mut_refs))] #![feature(const_slice_from_raw_parts_mut)] #![feature(const_ptr_write)] #![feature(const_try)] diff --git a/core/src/lib.rs b/core/src/lib.rs index 5b5d5d1a9610e..d503e58423f85 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -191,6 +191,7 @@ // // Language features: // tidy-alphabetical-start +#![cfg_attr(bootstrap, feature(const_mut_refs))] #![feature(abi_unadjusted)] #![feature(adt_const_params)] #![feature(allow_internal_unsafe)] @@ -201,7 +202,6 @@ #![feature(cfg_target_has_atomic_equal_alignment)] #![feature(cfg_ub_checks)] #![feature(const_for)] -#![feature(const_mut_refs)] #![feature(const_precise_live_drops)] #![feature(const_refs_to_cell)] #![feature(decl_macro)] diff --git a/core/src/ptr/mut_ptr.rs b/core/src/ptr/mut_ptr.rs index ddb9195d2e7c7..5fa3b9bf61f7f 100644 --- a/core/src/ptr/mut_ptr.rs +++ b/core/src/ptr/mut_ptr.rs @@ -1569,7 +1569,7 @@ impl *mut T { /// /// ``` /// #![feature(const_pointer_is_aligned)] - /// #![feature(const_mut_refs)] + /// # #![cfg_attr(bootstrap, feature(const_mut_refs))] /// /// // On some platforms, the alignment of primitives is less than their size. /// #[repr(align(4))] @@ -1695,7 +1695,7 @@ impl *mut T { /// ``` /// #![feature(pointer_is_aligned_to)] /// #![feature(const_pointer_is_aligned)] - /// #![feature(const_mut_refs)] + /// # #![cfg_attr(bootstrap, feature(const_mut_refs))] /// /// // On some platforms, the alignment of i32 is less than 4. /// #[repr(align(4))] diff --git a/core/tests/lib.rs b/core/tests/lib.rs index dbceb8abafc84..948ea9bc098be 100644 --- a/core/tests/lib.rs +++ b/core/tests/lib.rs @@ -1,4 +1,5 @@ // tidy-alphabetical-start +#![cfg_attr(bootstrap, feature(const_mut_refs))] #![cfg_attr(target_has_atomic = "128", feature(integer_atomics))] #![cfg_attr(test, feature(cfg_match))] #![feature(alloc_layout_extra)] @@ -26,7 +27,6 @@ #![feature(const_ipv6)] #![feature(const_likely)] #![feature(const_maybe_uninit_as_mut_ptr)] -#![feature(const_mut_refs)] #![feature(const_nonnull_new)] #![feature(const_option)] #![feature(const_option_ext)] diff --git a/std/src/lib.rs b/std/src/lib.rs index 60969af3e8541..bc5369ddc3daa 100644 --- a/std/src/lib.rs +++ b/std/src/lib.rs @@ -272,6 +272,7 @@ // // Language features: // tidy-alphabetical-start +#![cfg_attr(bootstrap, feature(const_mut_refs))] #![feature(alloc_error_handler)] #![feature(allocator_internals)] #![feature(allow_internal_unsafe)] @@ -281,7 +282,6 @@ #![feature(cfg_target_thread_local)] #![feature(cfi_encoding)] #![feature(concat_idents)] -#![feature(const_mut_refs)] #![feature(decl_macro)] #![feature(deprecated_suggestion)] #![feature(doc_cfg)]