Skip to content

Commit

Permalink
const_refs_to_cell: dont let mutable references sneak past the interi…
Browse files Browse the repository at this point in the history
…or mutability check
  • Loading branch information
RalfJung committed Sep 15, 2024
1 parent 5671193 commit 29c8eef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/slice/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ impl<T> [T] {
/// [`as_mut_ptr`]: slice::as_mut_ptr
#[stable(feature = "slice_ptr_range", since = "1.48.0")]
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")]
#[rustc_allow_const_fn_unstable(const_mut_refs)]
#[rustc_allow_const_fn_unstable(const_mut_refs, const_refs_to_cell)]
#[inline]
#[must_use]
pub const fn as_mut_ptr_range(&mut self) -> Range<*mut T> {
Expand Down

0 comments on commit 29c8eef

Please sign in to comment.