rust/library
Jubilee 58e84ff2b5
Rollup merge of #134016 - zachs18:stable-const-str-split_at, r=Amanieu
Stabilize `const_is_char_boundary` and `const_str_split_at`.

Tracking issues: #131516, #131518

Stabilized const API:

```rs
// in `core`
impl str {
    // const_is_char_boundary feature
    const fn is_char_boundary(&self, index: usize) -> bool;

    // const_str_split_at feature, depends on const_is_char_boundary
    const fn split_at(&self, mid: usize) -> (&str, &str);
    const fn split_at_mut(&mut self, mid: usize) -> (&mut str, &mut str);
    const fn split_at_checked(&self, mid: usize) -> Option<(&str, &str)>;
    const fn split_at_mut_checked(&mut self, mid: usize) -> Option<(&mut str, &mut str)>;
}
```

This will allow safely splitting string slices during const-eval.

Closes #131516, Closes #131518

This will need FCP.
r? libs-api

IIUC these do not use any new const language features (i.e. they are implementable manually on stable 1.83.0 using `unsafe`: [playground link](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=3679632cd1041084796241b7ac8edfbd)).

Cc ``@rust-lang/wg-const-eval`` (I don't know if I have the permissions for this ping; if not, someone else please ping wg-const-eval if it is necessary)
2025-02-14 14:05:22 -08:00
..
alloc Rollup merge of #136976 - jedbrown:jed/doc-boxed-deferred-init, r=tgross35 2025-02-14 16:23:33 +01:00
backtrace@9d2c34e7e6 Update backtrace 2025-02-13 14:32:50 -08:00
core Rollup merge of #134016 - zachs18:stable-const-str-split_at, r=Amanieu 2025-02-14 14:05:22 -08:00
coretests Auto merge of #134633 - GrigorenkoPV:get_disjoint_mut, r=cuviper 2025-02-13 21:09:31 +00:00
panic_abort Mark extern blocks as unsafe 2025-02-09 17:11:13 +00:00
panic_unwind Rollup merge of #136705 - compiler-errors:edition-library, r=jhpratt 2025-02-10 00:51:54 -08:00
portable-simd Merge commit '3383cfbd35' into sync-from-portable-simd-2025-01-18 2025-01-18 15:37:14 -05:00
proc_macro proc_macro: add #![warn(unreachable_pub)] 2025-01-20 18:46:29 +01:00
profiler_builtins compiler & tools dependencies: 2024-12-17 17:41:00 +00:00
rtstartup Mark extern blocks as unsafe 2025-02-09 17:11:13 +00:00
rustc-std-workspace-alloc Replace libstd, libcore, liballoc in line comments. 2022-12-30 14:00:42 +01:00
rustc-std-workspace-core update rustc-std-workspace crates 2024-11-04 07:45:15 +01:00
rustc-std-workspace-std
std Rollup merge of #136967 - DaniPopes:io-repeat-fill, r=joboet 2025-02-14 16:23:32 +01:00
stdarch@684de0d6fe Bump stdarch 2024-12-24 19:00:57 +01:00
sysroot Make profiler_builtins an optional dependency of sysroot, not std 2024-10-17 22:08:36 +11:00
test Rollup merge of #136705 - compiler-errors:edition-library, r=jhpratt 2025-02-10 00:51:54 -08:00
unwind Mark extern blocks as unsafe 2025-02-09 17:11:13 +00:00
windows_targets Mark extern blocks as unsafe 2025-02-09 17:11:13 +00:00
Cargo.lock Update compiler-builtins to 0.1.146 2025-02-07 20:58:28 +00:00
Cargo.toml Put all coretests in a separate crate 2025-01-26 10:26:36 +00:00