rust/library
许杰友 Jieyou Xu (Joe) 7ad1a3b8d8
Rollup merge of #136517 - m4rch3n1ng:inherent-str-constructors, r=jhpratt
implement inherent str constructors

implement #131114

this implements
- str::from_utf8
- str::from_utf8_mut
- str::from_utf8_unchecked
- str::from_utf8_unchecked_mut

i left `std::str::from_raw_parts` and `std::str::from_raw_parts_mut` out of this as those are unstable and were not mentioned by the tracking issue or the original pull request, but i can  add those here as well.

i was also unsure of what to do with the `rustc_const_(un)stable` attributes: i removed the `#[rustc_const_stable]` attribute from `str::from_utf8`, `str::from_utf8_unchecked` and `str::from_utf8_unchecked_mut`, and left the`#[rust_const_unstable]` in `str::from_utf8_mut` (btw why is that one not const stable yet with #57349 merged?).

is there a way to redirect users to the stable `std::str::from_utf8` instead of only saying "hey this is unstable"?

for now i just removed the check for `str::from_utf8` in the test in `tests/ui/suggestions/suggest-std-when-using-type.rs`.
2025-02-05 19:09:36 +08:00
..
alloc Update encode_utf16 to mention it is native endian 2025-01-31 11:44:11 +01:00
backtrace@f8cc6ac9ac Bump backtrace to 0.3.75 2025-01-03 20:16:52 -08:00
core Rollup merge of #136517 - m4rch3n1ng:inherent-str-constructors, r=jhpratt 2025-02-05 19:09:36 +08:00
coretests Auto merge of #135265 - pascaldekloe:fmt-int-speed, r=tgross35,ChrisDenton 2025-02-04 09:15:53 +00:00
panic_abort step cfg(bootstrap) 2024-07-28 14:46:29 -04:00
panic_unwind panic_unwind: add #![warn(unreachable_pub)] 2025-01-20 18:35:32 +01:00
portable-simd Bump stdarch 2024-12-24 19:00:57 +01: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 rtstartup: add #![warn(unreachable_pub)] 2025-01-20 18:35:32 +01:00
rustc-std-workspace-alloc
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 #136449 - joboet:move_pal_net, r=ChrisDenton 2025-02-05 19:09:35 +08: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 #135948 - bjorn3:update_emscripten_std_tests, r=Mark-Simulacrum 2025-01-25 23:27:00 -05:00
unwind Rollup merge of #131830 - hoodmane:emscripten-wasm-eh, r=workingjubilee 2025-01-06 22:04:13 -05:00
windows_targets Win: Add dbghelp to the list of import libraries 2024-09-06 21:21:49 +00:00
Cargo.lock Put all coretests in a separate crate 2025-01-26 10:26:36 +00:00
Cargo.toml Put all coretests in a separate crate 2025-01-26 10:26:36 +00:00