Skip to content

Commit 23a9436

Browse files
github-actions[bot]matthiaskrgrborsm-ou-semejrs
authored
Merge subtree update for toolchain nightly-2025-04-24 (#342)
This is an automated PR to merge library subtree updates from 2025-04-23 (rust-lang/rust@6bc57c6) to 2025-04-24 (rust-lang/rust@df35ff6) (inclusive) into main. `git merge` resulted in conflicts, which require manual resolution. Files were commited with merge conflict markers. **Do not remove or edit the following annotations:** git-subtree-dir: library git-subtree-split: 563e49d --------- Signed-off-by: xizheyin <[email protected]> Signed-off-by: Petros Angelatos <[email protected]> Signed-off-by: Huang Qi <[email protected]> Signed-off-by: Ayush Singh <[email protected]> Signed-off-by: Alice Ryhl <[email protected]> Co-authored-by: Matthias Krüger <[email protected]> Co-authored-by: bors <[email protected]> Co-authored-by: Mara Bos <[email protected]> Co-authored-by: mejrs <[email protected]> Co-authored-by: okaneco <[email protected]> Co-authored-by: Jacob Pratt <[email protected]> Co-authored-by: xizheyin <[email protected]> Co-authored-by: Benoît du Garreau <[email protected]> Co-authored-by: clubby789 <[email protected]> Co-authored-by: Takayuki Maeda <[email protected]> Co-authored-by: Daniel Bloom <[email protected]> Co-authored-by: Trevor Gross <[email protected]> Co-authored-by: Jake Wharton <[email protected]> Co-authored-by: bjorn3 <[email protected]> Co-authored-by: Ralf Jung <[email protected]> Co-authored-by: Guillaume Gomez <[email protected]> Co-authored-by: Kornel <[email protected]> Co-authored-by: Chris Denton <[email protected]> Co-authored-by: Calder Coalson <[email protected]> Co-authored-by: Stuart Cook <[email protected]> Co-authored-by: Thalia Archibald <[email protected]> Co-authored-by: github-actions <[email protected]> Co-authored-by: Scott McMurray <[email protected]> Co-authored-by: izarma <[email protected]> Co-authored-by: Bennet Bleßmann <[email protected]> Co-authored-by: Celina G. Val <[email protected]> Co-authored-by: Jonathan Gruner <[email protected]> Co-authored-by: Stan Manilov <[email protected]> Co-authored-by: Gabriel Bjørnager Jensen <[email protected]> Co-authored-by: lincot <[email protected]> Co-authored-by: timesince <[email protected]> Co-authored-by: Boxy <[email protected]> Co-authored-by: oyvindln <[email protected]> Co-authored-by: Berrysoft <[email protected]> Co-authored-by: Alice Ryhl <[email protected]> Co-authored-by: Folkert de Vries <[email protected]> Co-authored-by: Bastian Kersting <[email protected]> Co-authored-by: Petros Angelatos <[email protected]> Co-authored-by: Jesus Checa Hidalgo <[email protected]> Co-authored-by: Michael Howell <[email protected]> Co-authored-by: Ricardo Fernández Serrata <[email protected]> Co-authored-by: GenYuLi <[email protected]> Co-authored-by: Chris Denton <[email protected]> Co-authored-by: Amanieu d'Antras <[email protected]> Co-authored-by: Sky <[email protected]> Co-authored-by: Huang Qi <[email protected]> Co-authored-by: Ayush Singh <[email protected]> Co-authored-by: Jethro Beekman <[email protected]> Co-authored-by: 0x79de <[email protected]> Co-authored-by: binarycat <[email protected]> Co-authored-by: Glyn Normington <[email protected]> Co-authored-by: Tamir Duberstein <[email protected]> Co-authored-by: Josh Triplett <[email protected]> Co-authored-by: Bastian Kersting <[email protected]> Co-authored-by: Lyndon Brown <[email protected]> Co-authored-by: Kent Ross <[email protected]> Co-authored-by: Noa <[email protected]> Co-authored-by: Lieselotte <[email protected]> Co-authored-by: Patrick Mooney <[email protected]> Co-authored-by: Onè <[email protected]> Co-authored-by: gitbot <git@bot> Co-authored-by: Carolyn Zech <[email protected]>
1 parent c28334f commit 23a9436

File tree

15 files changed

+49
-15
lines changed

15 files changed

+49
-15
lines changed

library/Cargo.lock

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

library/alloc/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ bench = false
1616

1717
[dependencies]
1818
core = { path = "../core", public = true }
19-
compiler_builtins = { version = "=0.1.155", features = ['rustc-dep-of-std'] }
2019
safety = { path = "../contracts/safety" }
20+
compiler_builtins = { version = "=0.1.156", features = ['rustc-dep-of-std'] }
2121

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

library/core/src/num/f128.rs

+3
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,9 @@ impl f128 {
151151
pub const RADIX: u32 = 2;
152152

153153
/// Number of significant digits in base 2.
154+
///
155+
/// Note that the size of the mantissa in the bitwise representation is one
156+
/// smaller than this since the leading 1 is not stored explicitly.
154157
#[unstable(feature = "f128", issue = "116909")]
155158
pub const MANTISSA_DIGITS: u32 = 113;
156159

library/core/src/num/f16.rs

+3
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,9 @@ impl f16 {
146146
pub const RADIX: u32 = 2;
147147

148148
/// Number of significant digits in base 2.
149+
///
150+
/// Note that the size of the mantissa in the bitwise representation is one
151+
/// smaller than this since the leading 1 is not stored explicitly.
149152
#[unstable(feature = "f16", issue = "116909")]
150153
pub const MANTISSA_DIGITS: u32 = 11;
151154

library/core/src/num/f32.rs

+3
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,9 @@ impl f32 {
396396
pub const RADIX: u32 = 2;
397397

398398
/// Number of significant digits in base 2.
399+
///
400+
/// Note that the size of the mantissa in the bitwise representation is one
401+
/// smaller than this since the leading 1 is not stored explicitly.
399402
#[stable(feature = "assoc_int_consts", since = "1.43.0")]
400403
pub const MANTISSA_DIGITS: u32 = 24;
401404

library/core/src/num/f64.rs

+3
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,9 @@ impl f64 {
396396
pub const RADIX: u32 = 2;
397397

398398
/// Number of significant digits in base 2.
399+
///
400+
/// Note that the size of the mantissa in the bitwise representation is one
401+
/// smaller than this since the leading 1 is not stored explicitly.
399402
#[stable(feature = "assoc_int_consts", since = "1.43.0")]
400403
pub const MANTISSA_DIGITS: u32 = 53;
401404
/// Approximate number of significant digits in base 10.

library/std/Cargo.toml

+1-1
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.155" }
21+
compiler_builtins = { version = "=0.1.156" }
2222
unwind = { path = "../unwind" }
2323
hashbrown = { version = "0.15", default-features = false, features = [
2424
'rustc-dep-of-std',

library/std/src/path.rs

+17-7
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,15 @@ fn split_file_at_dot(file: &OsStr) -> (&OsStr, Option<&OsStr>) {
353353
}
354354
}
355355

356+
/// Checks whether the string is valid as a file extension, or panics otherwise.
357+
fn validate_extension(extension: &OsStr) {
358+
for &b in extension.as_encoded_bytes() {
359+
if is_sep_byte(b) {
360+
panic!("extension cannot contain path separators: {extension:?}");
361+
}
362+
}
363+
}
364+
356365
////////////////////////////////////////////////////////////////////////////////
357366
// The core iterators
358367
////////////////////////////////////////////////////////////////////////////////
@@ -1507,13 +1516,7 @@ impl PathBuf {
15071516
}
15081517

15091518
fn _set_extension(&mut self, extension: &OsStr) -> bool {
1510-
for &b in extension.as_encoded_bytes() {
1511-
if b < 128 {
1512-
if is_separator(b as char) {
1513-
panic!("extension cannot contain path separators: {:?}", extension);
1514-
}
1515-
}
1516-
}
1519+
validate_extension(extension);
15171520

15181521
let file_stem = match self.file_stem() {
15191522
None => return false,
@@ -1541,6 +1544,11 @@ impl PathBuf {
15411544
/// Returns `false` and does nothing if [`self.file_name`] is [`None`],
15421545
/// returns `true` and updates the extension otherwise.
15431546
///
1547+
/// # Panics
1548+
///
1549+
/// Panics if the passed extension contains a path separator (see
1550+
/// [`is_separator`]).
1551+
///
15441552
/// # Caveats
15451553
///
15461554
/// The appended `extension` may contain dots and will be used in its entirety,
@@ -1582,6 +1590,8 @@ impl PathBuf {
15821590
}
15831591

15841592
fn _add_extension(&mut self, extension: &OsStr) -> bool {
1593+
validate_extension(extension);
1594+
15851595
let file_name = match self.file_name() {
15861596
None => return false,
15871597
Some(f) => f.as_encoded_bytes(),

library/std/src/sys/process/unix/unix.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,7 @@ impl Command {
415415
all(target_os = "linux", target_env = "musl"),
416416
target_os = "nto",
417417
target_vendor = "apple",
418+
target_os = "cygwin",
418419
)))]
419420
fn posix_spawn(
420421
&mut self,
@@ -433,6 +434,7 @@ impl Command {
433434
all(target_os = "linux", target_env = "musl"),
434435
target_os = "nto",
435436
target_vendor = "apple",
437+
target_os = "cygwin",
436438
))]
437439
fn posix_spawn(
438440
&mut self,
@@ -584,7 +586,7 @@ impl Command {
584586
/// Some platforms can set a new working directory for a spawned process in the
585587
/// `posix_spawn` path. This function looks up the function pointer for adding
586588
/// such an action to a `posix_spawn_file_actions_t` struct.
587-
#[cfg(not(all(target_os = "linux", target_env = "musl")))]
589+
#[cfg(not(any(all(target_os = "linux", target_env = "musl"), target_os = "cygwin")))]
588590
fn get_posix_spawn_addchdir() -> Option<PosixSpawnAddChdirFn> {
589591
use crate::sys::weak::weak;
590592

@@ -618,7 +620,9 @@ impl Command {
618620
/// Weak symbol lookup doesn't work with statically linked libcs, so in cases
619621
/// where static linking is possible we need to either check for the presence
620622
/// of the symbol at compile time or know about it upfront.
621-
#[cfg(all(target_os = "linux", target_env = "musl"))]
623+
///
624+
/// Cygwin doesn't support weak symbol, so just link it.
625+
#[cfg(any(all(target_os = "linux", target_env = "musl"), target_os = "cygwin"))]
622626
fn get_posix_spawn_addchdir() -> Option<PosixSpawnAddChdirFn> {
623627
// Our minimum required musl supports this function, so we can just use it.
624628
Some(libc::posix_spawn_file_actions_addchdir_np)

library/std/tests/floats/f128.rs

+2
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ fn test_nan() {
112112
assert!(!nan.is_sign_negative());
113113
assert!(!nan.is_normal());
114114
assert_eq!(Fp::Nan, nan.classify());
115+
// Ensure the quiet bit is set.
116+
assert!(nan.to_bits() & (1 << (f128::MANTISSA_DIGITS - 2)) != 0);
115117
}
116118

117119
#[test]

library/std/tests/floats/f16.rs

+2
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ fn test_nan() {
9595
assert!(!nan.is_sign_negative());
9696
assert!(!nan.is_normal());
9797
assert_eq!(Fp::Nan, nan.classify());
98+
// Ensure the quiet bit is set.
99+
assert!(nan.to_bits() & (1 << (f16::MANTISSA_DIGITS - 2)) != 0);
98100
}
99101

100102
#[test]

library/std/tests/floats/f32.rs

+2
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ fn test_nan() {
7272
assert!(nan.is_sign_positive());
7373
assert!(!nan.is_sign_negative());
7474
assert_eq!(Fp::Nan, nan.classify());
75+
// Ensure the quiet bit is set.
76+
assert!(nan.to_bits() & (1 << (f32::MANTISSA_DIGITS - 2)) != 0);
7577
}
7678

7779
#[test]

library/std/tests/floats/f64.rs

+2
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ fn test_nan() {
6060
assert!(nan.is_sign_positive());
6161
assert!(!nan.is_sign_negative());
6262
assert_eq!(Fp::Nan, nan.classify());
63+
// Ensure the quiet bit is set.
64+
assert!(nan.to_bits() & (1 << (f64::MANTISSA_DIGITS - 2)) != 0);
6365
}
6466

6567
#[test]

rust-toolchain.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
# standard library we currently track.
33

44
[toolchain]
5-
channel = "nightly-2025-04-23"
5+
channel = "nightly-2025-04-24"
66
components = ["llvm-tools-preview", "rustc-dev", "rust-src", "rustfmt"]

tool_config/kani-version.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# incompatible with the verify-std repo.
33

44
[kani]
5-
commit = "2879207097a875f22768aec1e972c9b87b01b1b6"
5+
commit = "d6853436382d876e574fb8a3fdef5b798a6e7d0d"

0 commit comments

Comments
 (0)