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)
This is the main source code repository for Rust. It contains the compiler, standard library, and documentation.
Why Rust?
-
Performance: Fast and memory-efficient, suitable for critical services, embedded devices, and easily integrated with other languages.
-
Reliability: Our rich type system and ownership model ensure memory and thread safety, reducing bugs at compile-time.
-
Productivity: Comprehensive documentation, a compiler committed to providing great diagnostics, and advanced tooling including package manager and build tool (Cargo), auto-formatter (rustfmt), linter (Clippy) and editor support (rust-analyzer).
Quick Start
Read "Installation" from The Book.
Installing from Source
If you really want to install from source (though this is not recommended), see INSTALL.md.
Getting Help
See https://www.rust-lang.org/community for a list of chat platforms and forums.
Contributing
See CONTRIBUTING.md.
License
Rust is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0), with portions covered by various BSD-like licenses.
See LICENSE-APACHE, LICENSE-MIT, and COPYRIGHT for details.
Trademark
The Rust Foundation owns and protects the Rust and Cargo trademarks and logos (the "Rust Trademarks").
If you want to use these names or brands, please read the media guide.
Third-party logos may be subject to third-party copyrights and trademarks. See Licenses for details.