Skip to content

Commit 999a8cc

Browse files
committed
Auto merge of rust-lang#141824 - matthiaskrgr:rollup-7nffwd0, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - rust-lang#140787 (Note expr being cast when encounter NonScalar cast error) - rust-lang#141112 (std: note that `std::str::from_utf8*` functions are aliases to `<str>::from_utf8*` methods) - rust-lang#141646 (Document what `distcheck` is intended to exercise) - rust-lang#141740 (Hir item kind field order) - rust-lang#141793 (`tests/ui`: A New Order [1/N]) - rust-lang#141805 (Update `compiler-builtins` to 0.1.160) - rust-lang#141815 (Enable non-leaf Frame Pointers for mingw-w64 Arm64 Windows) - rust-lang#141819 (Fixes for building windows-gnullvm hosts) r? `@ghost` `@rustbot` modify labels: rollup
2 parents e5b54e6 + 91b5394 commit 999a8cc

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

alloc/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ bench = false
1616

1717
[dependencies]
1818
core = { path = "../core", public = true }
19-
compiler_builtins = { version = "=0.1.159", features = ['rustc-dep-of-std'] }
19+
compiler_builtins = { version = "=0.1.160", features = ['rustc-dep-of-std'] }
2020

2121
[features]
2222
compiler-builtins-mem = ['compiler_builtins/mem']

core/src/str/converts.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ use crate::{mem, ptr};
66

77
/// Converts a slice of bytes to a string slice.
88
///
9+
/// This is an alias to [`str::from_utf8`].
10+
///
911
/// A string slice ([`&str`]) is made of bytes ([`u8`]), and a byte slice
1012
/// ([`&[u8]`][byteslice]) is made of bytes, so this function converts between
1113
/// the two. Not all byte slices are valid string slices, however: [`&str`] requires
@@ -97,6 +99,8 @@ pub const fn from_utf8(v: &[u8]) -> Result<&str, Utf8Error> {
9799

98100
/// Converts a mutable slice of bytes to a mutable string slice.
99101
///
102+
/// This is an alias to [`str::from_utf8_mut`].
103+
///
100104
/// # Examples
101105
///
102106
/// Basic usage:
@@ -142,6 +146,8 @@ pub const fn from_utf8_mut(v: &mut [u8]) -> Result<&mut str, Utf8Error> {
142146
/// Converts a slice of bytes to a string slice without checking
143147
/// that the string contains valid UTF-8.
144148
///
149+
/// This is an alias to [`str::from_utf8_unchecked`].
150+
///
145151
/// See the safe version, [`from_utf8`], for more information.
146152
///
147153
/// # Safety
@@ -178,6 +184,8 @@ pub const unsafe fn from_utf8_unchecked(v: &[u8]) -> &str {
178184
/// Converts a slice of bytes to a string slice without checking
179185
/// that the string contains valid UTF-8; mutable version.
180186
///
187+
/// This is an alias to [`str::from_utf8_unchecked_mut`].
188+
///
181189
/// See the immutable version, [`from_utf8_unchecked()`] for documentation and safety requirements.
182190
///
183191
/// # Examples

std/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ cfg-if = { version = "1.0", features = ['rustc-dep-of-std'] }
1818
panic_unwind = { path = "../panic_unwind", optional = true }
1919
panic_abort = { path = "../panic_abort" }
2020
core = { path = "../core", public = true }
21-
compiler_builtins = { version = "=0.1.159" }
21+
compiler_builtins = { version = "=0.1.160" }
2222
unwind = { path = "../unwind" }
2323
hashbrown = { version = "0.15", default-features = false, features = [
2424
'rustc-dep-of-std',

0 commit comments

Comments
 (0)