rust/library
Matthias Krüger 08d5b2303a
Rollup merge of #135073 - joshtriplett:bstr, r=BurntSushi
Implement `ByteStr` and `ByteString` types

Approved ACP: https://github.com/rust-lang/libs-team/issues/502
Tracking issue: https://github.com/rust-lang/rust/issues/134915

These types represent human-readable strings that are conventionally,
but not always, UTF-8. The `Debug` impl prints non-UTF-8 bytes using
escape sequences, and the `Display` impl uses the Unicode replacement
character.

This is a minimal implementation of these types and associated trait
impls. It does not add any helper methods to other types such as `[u8]`
or `Vec<u8>`.

I've omitted a few implementations of `AsRef`, `AsMut`, and `Borrow`,
when those would be the second implementation for a type (counting the
`T` impl), to avoid potential inference failures. We can attempt to add
more impls later in standalone commits, and run them through crater.

In addition to the `bstr` feature, I've added a `bstr_internals` feature
for APIs provided by `core` for use by `alloc` but not currently
intended for stabilization.

This API and its implementation are based *heavily* on the `bstr` crate
by Andrew Gallant (`@BurntSushi).`

r? `@BurntSushi`
2025-01-23 19:54:23 +01:00
..
alloc Rollup merge of #135073 - joshtriplett:bstr, r=BurntSushi 2025-01-23 19:54:23 +01:00
backtrace@f8cc6ac9ac Bump backtrace to 0.3.75 2025-01-03 20:16:52 -08:00
core Rollup merge of #135073 - joshtriplett:bstr, r=BurntSushi 2025-01-23 19:54:23 +01: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 Add inherent versions of MaybeUninit methods for slices 2025-01-11 23:57:00 -05: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 #135073 - joshtriplett:bstr, r=BurntSushi 2025-01-23 19:54:23 +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 Update thread spawn hooks. 2024-11-19 18:54:20 +01: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 cargo update 2025-01-19 00:21:55 +00:00
Cargo.toml library: fix adler{-> 2}.debug 2025-01-05 01:40:09 +01:00