Rollup merge of #129195 - RalfJung:const-mut-refs, r=fee1-dead · qinheping/verify-rust-std@3dccb86 (original) (raw)
7 files changed
lines changed
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -114,7 +114,6 @@ | ||
114 | 114 | #![feature(const_maybe_uninit_write)] |
115 | 115 | #![feature(const_option)] |
116 | 116 | #![feature(const_pin)] |
117 | -#![feature(const_refs_to_cell)] | |
118 | 117 | #![feature(const_size_of_val)] |
119 | 118 | #![feature(core_intrinsics)] |
120 | 119 | #![feature(deprecated_suggestion)] |
@@ -164,13 +163,14 @@ | ||
164 | 163 | // |
165 | 164 | // Language features: |
166 | 165 | // tidy-alphabetical-start |
166 | +#![cfg_attr(bootstrap, feature(const_mut_refs))] | |
167 | +#![cfg_attr(bootstrap, feature(const_refs_to_cell))] | |
167 | 168 | #![cfg_attr(not(test), feature(coroutine_trait))] |
168 | 169 | #![cfg_attr(test, feature(panic_update_hook))] |
169 | 170 | #![cfg_attr(test, feature(test))] |
170 | 171 | #![feature(allocator_internals)] |
171 | 172 | #![feature(allow_internal_unstable)] |
172 | 173 | #![feature(cfg_sanitize)] |
173 | -#![feature(const_mut_refs)] | |
174 | 174 | #![feature(const_precise_live_drops)] |
175 | 175 | #![feature(const_ptr_write)] |
176 | 176 | #![feature(const_try)] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -6,7 +6,7 @@ | ||
6 | 6 | #![feature(cow_is_borrowed)] |
7 | 7 | #![feature(const_cow_is_borrowed)] |
8 | 8 | #![feature(const_heap)] |
9 | -#![feature(const_mut_refs)] | |
9 | +#![cfg_attr(bootstrap, feature(const_mut_refs))] | |
10 | 10 | #![feature(const_slice_from_raw_parts_mut)] |
11 | 11 | #![feature(const_ptr_write)] |
12 | 12 | #![feature(const_try)] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -191,6 +191,8 @@ | ||
191 | 191 | // |
192 | 192 | // Language features: |
193 | 193 | // tidy-alphabetical-start |
194 | +#![cfg_attr(bootstrap, feature(const_mut_refs))] | |
195 | +#![cfg_attr(bootstrap, feature(const_refs_to_cell))] | |
194 | 196 | #![feature(abi_unadjusted)] |
195 | 197 | #![feature(adt_const_params)] |
196 | 198 | #![feature(allow_internal_unsafe)] |
@@ -201,9 +203,7 @@ | ||
201 | 203 | #![feature(cfg_target_has_atomic_equal_alignment)] |
202 | 204 | #![feature(cfg_ub_checks)] |
203 | 205 | #![feature(const_for)] |
204 | -#![feature(const_mut_refs)] | |
205 | 206 | #![feature(const_precise_live_drops)] |
206 | -#![feature(const_refs_to_cell)] | |
207 | 207 | #![feature(decl_macro)] |
208 | 208 | #![feature(deprecated_suggestion)] |
209 | 209 | #![feature(doc_cfg)] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1569,7 +1569,7 @@ impl<T: ?Sized> *mut T { | ||
1569 | 1569 | /// |
1570 | 1570 | /// ``` |
1571 | 1571 | /// #![feature(const_pointer_is_aligned)] |
1572 | - /// #![feature(const_mut_refs)] | |
1572 | + /// # #![cfg_attr(bootstrap, feature(const_mut_refs))] | |
1573 | 1573 | /// |
1574 | 1574 | /// // On some platforms, the alignment of primitives is less than their size. |
1575 | 1575 | /// #[repr(align(4))] |
@@ -1695,7 +1695,7 @@ impl<T: ?Sized> *mut T { | ||
1695 | 1695 | /// ``` |
1696 | 1696 | /// #![feature(pointer_is_aligned_to)] |
1697 | 1697 | /// #![feature(const_pointer_is_aligned)] |
1698 | - /// #![feature(const_mut_refs)] | |
1698 | + /// # #![cfg_attr(bootstrap, feature(const_mut_refs))] | |
1699 | 1699 | /// |
1700 | 1700 | /// // On some platforms, the alignment of i32 is less than 4. |
1701 | 1701 | /// #[repr(align(4))] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -846,7 +846,7 @@ impl [T] { | ||
846 | 846 | /// [`as_mut_ptr`]: slice::as_mut_ptr |
847 | 847 | #[stable(feature = "slice_ptr_range", since = "1.48.0")] |
848 | 848 | #[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")] |
849 | -#[rustc_allow_const_fn_unstable(const_mut_refs)] | |
849 | +#[cfg_attr(bootstrap, rustc_allow_const_fn_unstable(const_mut_refs, const_refs_to_cell))] | |
850 | 850 | #[inline] |
851 | 851 | #[must_use] |
852 | 852 | pub const fn as_mut_ptr_range(&mut self) -> Range<*mut T> { |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
1 | 1 | // tidy-alphabetical-start |
2 | +#![cfg_attr(bootstrap, feature(const_mut_refs))] | |
2 | 3 | #![cfg_attr(target_has_atomic = "128", feature(integer_atomics))] |
3 | 4 | #![cfg_attr(test, feature(cfg_match))] |
4 | 5 | #![feature(alloc_layout_extra)] |
@@ -26,7 +27,6 @@ | ||
26 | 27 | #![feature(const_ipv6)] |
27 | 28 | #![feature(const_likely)] |
28 | 29 | #![feature(const_maybe_uninit_as_mut_ptr)] |
29 | -#![feature(const_mut_refs)] | |
30 | 30 | #![feature(const_nonnull_new)] |
31 | 31 | #![feature(const_option)] |
32 | 32 | #![feature(const_option_ext)] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -272,6 +272,7 @@ | ||
272 | 272 | // |
273 | 273 | // Language features: |
274 | 274 | // tidy-alphabetical-start |
275 | +#![cfg_attr(bootstrap, feature(const_mut_refs))] | |
275 | 276 | #![feature(alloc_error_handler)] |
276 | 277 | #![feature(allocator_internals)] |
277 | 278 | #![feature(allow_internal_unsafe)] |
@@ -281,7 +282,6 @@ | ||
281 | 282 | #![feature(cfg_target_thread_local)] |
282 | 283 | #![feature(cfi_encoding)] |
283 | 284 | #![feature(concat_idents)] |
284 | -#![feature(const_mut_refs)] | |
285 | 285 | #![feature(decl_macro)] |
286 | 286 | #![feature(deprecated_suggestion)] |
287 | 287 | #![feature(doc_cfg)] |