diff options
author | bors <bors@rust-lang.org> | 2023-05-15 03:54:33 +0000 |
---|---|---|
committer | bors <bors@rust-lang.org> | 2023-05-15 03:54:33 +0000 |
commit | 0bcfd2d96efe7a2cb5205c3af1b9eea17423fe65 (patch) | |
tree | be2db15597b13c42754e9de5f7e13244f3ebe7f3 /library | |
parent | 8d18c32b61476ed16dd15074e71be3970368d6d7 (diff) | |
parent | b46b05d1d2374a788787ce3d850d06794a6174c0 (diff) | |
download | rust-0bcfd2d96efe7a2cb5205c3af1b9eea17423fe65.tar.gz |
Auto merge of #108273 - tspiteri:const_slice_split_at_not_mut, r=dtolnay
Stabilize const slice::split_at
This stabilizes the use of the following method in const context:
```rust
impl<T> [T] {
pub const fn split_at(&self, mid: usize) -> (&[T], &[T]);
}
```
cc tracking issue #101158
Diffstat (limited to 'library')
-rw-r--r-- | library/core/src/slice/mod.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/library/core/src/slice/mod.rs b/library/core/src/slice/mod.rs index c2e9ba273a5..6fd2b87d0e3 100644 --- a/library/core/src/slice/mod.rs +++ b/library/core/src/slice/mod.rs @@ -1595,7 +1595,8 @@ impl<T> [T] { /// } /// ``` #[stable(feature = "rust1", since = "1.0.0")] - #[rustc_const_unstable(feature = "const_slice_split_at_not_mut", issue = "101158")] + #[rustc_const_stable(feature = "const_slice_split_at_not_mut", since = "CURRENT_RUSTC_VERSION")] + #[rustc_allow_const_fn_unstable(slice_split_at_unchecked)] #[inline] #[track_caller] #[must_use] |