Skip to content

Commit 29c8eef

Browse files
committed
const_refs_to_cell: dont let mutable references sneak past the interior mutability check
1 parent 5671193 commit 29c8eef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/slice/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,7 @@ impl<T> [T] {
846846
/// [`as_mut_ptr`]: slice::as_mut_ptr
847847
#[stable(feature = "slice_ptr_range", since = "1.48.0")]
848848
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")]
849-
#[rustc_allow_const_fn_unstable(const_mut_refs)]
849+
#[rustc_allow_const_fn_unstable(const_mut_refs, const_refs_to_cell)]
850850
#[inline]
851851
#[must_use]
852852
pub const fn as_mut_ptr_range(&mut self) -> Range<*mut T> {

0 commit comments

Comments
 (0)