diff options
| author | SaltyKitkat <954537646@qq.com> | 2022-02-13 16:16:41 +0800 |
|---|---|---|
| committer | SaltyKitkat <954537646@qq.com> | 2022-02-13 16:16:41 +0800 |
| commit | ee87c80a856541eb96332c4067fdfec3740a3db6 (patch) | |
| tree | 223a90424ffbeae4d5a05bdd269e0b997870569c /library | |
| parent | 3c142b0ffef3d423ee1e176b30892702d3eb29ac (diff) | |
| download | rust-ee87c80a856541eb96332c4067fdfec3740a3db6.tar.gz rust-ee87c80a856541eb96332c4067fdfec3740a3db6.zip | |
allow const_mut_refs
Diffstat (limited to 'library')
| -rw-r--r-- | library/core/src/slice/mod.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/library/core/src/slice/mod.rs b/library/core/src/slice/mod.rs index 3435b11351b..3188763976f 100644 --- a/library/core/src/slice/mod.rs +++ b/library/core/src/slice/mod.rs @@ -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 { @@ -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> { |
