Rollup merge of #100076 - tspiteri:const_slice_split_at, r=oli-obk

make slice::{split_at,split_at_unchecked} const functions

Now that `slice::from_raw_parts` is const in stable 1.64, it makes sense to have `split_at` const as well, otherwise unsafe code is required to achieve a const equivalent.
This commit is contained in:
Yuki Okushi
2022-08-26 09:51:43 +09:00
committed by GitHub
2 changed files with 14 additions and 4 deletions

View File

@@ -149,6 +149,7 @@
#![feature(maybe_uninit_uninit_array)]
#![feature(ptr_metadata)]
#![feature(slice_ptr_get)]
#![feature(slice_split_at_unchecked)]
#![feature(str_internals)]
#![feature(utf16_extra)]
#![feature(utf16_extra_const)]