Skip to content

Commit 8f9ba12

Browse files
SaltyKitkatdtolnay
authored andcommitted
allow const_mut_refs
1 parent 45bc746 commit 8f9ba12

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

library/core/src/slice/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,7 @@ impl<T> [T] {
479479
/// ```
480480
#[stable(feature = "rust1", since = "1.0.0")]
481481
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.60.0")]
482+
#[rustc_allow_const_fn_unstable(const_mut_refs)]
482483
#[inline]
483484
pub const fn as_mut_ptr(&mut self) -> *mut T {
484485
self as *mut [T] as *mut T
@@ -556,6 +557,7 @@ impl<T> [T] {
556557
/// [`as_mut_ptr`]: slice::as_mut_ptr
557558
#[stable(feature = "slice_ptr_range", since = "1.48.0")]
558559
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.60.0")]
560+
#[rustc_allow_const_fn_unstable(const_mut_refs)]
559561
#[inline]
560562
pub const fn as_mut_ptr_range(&mut self) -> Range<*mut T> {
561563
let start = self.as_mut_ptr();

0 commit comments

Comments
 (0)