Skip to content

Commit

Permalink
allow const_mut_refs
Browse files Browse the repository at this point in the history
  • Loading branch information
SaltyKitkat committed Feb 13, 2022
1 parent 3c142b0 commit ee87c80
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions library/core/src/slice/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,7 @@ impl<T> [T] {
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(feature = "const_ptr_offset", since = "1.60.0")]
#[rustc_allow_const_fn_unstable(const_mut_refs)]
#[inline]
#[must_use]
pub const fn as_mut_ptr(&mut self) -> *mut T {
Expand Down Expand Up @@ -579,6 +580,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.60.0")]
#[rustc_allow_const_fn_unstable(const_mut_refs)]
#[inline]
#[must_use]
pub const fn as_mut_ptr_range(&mut self) -> Range<*mut T> {
Expand Down

0 comments on commit ee87c80

Please sign in to comment.