Skip to content

Commit 9949c4a

Browse files
github-actions[bot]matthiaskrgrpaolobarbolinifmeaseUrgau
authored
Merge subtree update for toolchain nightly-2025-06-03 (#380)
This is an automated PR to merge library subtree updates from 2025-06-02 (rust-lang/rust@99e7c15) to 2025-06-03 (rust-lang/rust@5d707b0), inclusive. This is a clean merge, no conflicts were detected. **Do not remove or edit the following annotations:** git-subtree-dir: library git-subtree-split: 018adbd --------- Signed-off-by: Paul Mabileau <[email protected]> Signed-off-by: xizheyin <[email protected]> Signed-off-by: Ayush Singh <[email protected]> Co-authored-by: Matthias Krüger <[email protected]> Co-authored-by: Paolo Barbolini <[email protected]> Co-authored-by: León Orell Valerian Liehr <[email protected]> Co-authored-by: Urgau <[email protected]> Co-authored-by: Pietro Albini <[email protected]> Co-authored-by: Simon Sapin <[email protected]> Co-authored-by: Julian Knodt <[email protected]> Co-authored-by: Michael Goulet <[email protected]> Co-authored-by: Trevor Gross <[email protected]> Co-authored-by: Michał Łowicki <[email protected]> Co-authored-by: Mathis Bottinelli <[email protected]> Co-authored-by: Samuel Tardieu <[email protected]> Co-authored-by: B I Mohammed Abbas <[email protected]> Co-authored-by: Federico Terzi <[email protected]> Co-authored-by: teor <[email protected]> Co-authored-by: Eric Huss <[email protected]> Co-authored-by: joboet <[email protected]> Co-authored-by: bors <[email protected]> Co-authored-by: Ryan van Polen <[email protected]> Co-authored-by: sam skeoch <[email protected]> Co-authored-by: Benoît du Garreau <[email protected]> Co-authored-by: est31 <[email protected]> Co-authored-by: GrantBirki <[email protected]> Co-authored-by: Paul Mabileau <[email protected]> Co-authored-by: Jack O'Connor <[email protected]> Co-authored-by: mejrs <[email protected]> Co-authored-by: sayantn <[email protected]> Co-authored-by: Fluid <[email protected]> Co-authored-by: xizheyin <[email protected]> Co-authored-by: Speedy_Lex <[email protected]> Co-authored-by: Stuart Cook <[email protected]> Co-authored-by: Jeremy Smart <[email protected]> Co-authored-by: Ralf Jung <[email protected]> Co-authored-by: Mario Pastorelli <[email protected]> Co-authored-by: Marcelo Domínguez <[email protected]> Co-authored-by: Daniel McNab <[email protected]> Co-authored-by: Josh Triplett <[email protected]> Co-authored-by: Christopher Berner <[email protected]> Co-authored-by: Amanieu d'Antras <[email protected]> Co-authored-by: Jonas Platte <[email protected]> Co-authored-by: Marcelo Domínguez <[email protected]> Co-authored-by: Ben Kimock <[email protected]> Co-authored-by: Folkert de Vries <[email protected]> Co-authored-by: waffle <[email protected]> Co-authored-by: Dannyyy93 <[email protected]> Co-authored-by: Ayush Singh <[email protected]> Co-authored-by: Tamir Duberstein <[email protected]> Co-authored-by: Guillaume Gomez <[email protected]> Co-authored-by: Tshepang Mbambo <[email protected]> Co-authored-by: Jacob Pratt <[email protected]> Co-authored-by: Chris Denton <[email protected]> Co-authored-by: bendn <[email protected]> Co-authored-by: 许杰友 Jieyou Xu (Joe) <[email protected]> Co-authored-by: binarycat <[email protected]> Co-authored-by: The Miri Cronjob Bot <[email protected]> Co-authored-by: Sidney Cammeresi <[email protected]> Co-authored-by: bjorn3 <[email protected]> Co-authored-by: tk <[email protected]> Co-authored-by: Trevor Gross <[email protected]> Co-authored-by: Jakub Beránek <[email protected]> Co-authored-by: Orson Peters <[email protected]> Co-authored-by: Patrick-6 <[email protected]> Co-authored-by: WANG Rui <[email protected]> Co-authored-by: Scott McMurray <[email protected]> Co-authored-by: Jubilee <[email protected]> Co-authored-by: Ruan Comelli <[email protected]> Co-authored-by: zacryol <[email protected]> Co-authored-by: usamoi <[email protected]> Co-authored-by: gitbot <git@bot> Co-authored-by: Carolyn Zech <[email protected]> Co-authored-by: thanhnguyen-aws <[email protected]>
1 parent 3600e5d commit 9949c4a

File tree

7 files changed

+19
-7
lines changed

7 files changed

+19
-7
lines changed

library/core/src/marker.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ pub trait Unsize<T: ?Sized> {
200200
///
201201
/// Constants are only allowed as patterns if (a) their type implements
202202
/// `PartialEq`, and (b) interpreting the value of the constant as a pattern
203-
/// is equialent to calling `PartialEq`. This ensures that constants used as
203+
/// is equivalent to calling `PartialEq`. This ensures that constants used as
204204
/// patterns cannot expose implementation details in an unexpected way or
205205
/// cause semver hazards.
206206
///

library/core/src/num/f128.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ impl f128 {
177177
/// [Machine epsilon]: https://en.wikipedia.org/wiki/Machine_epsilon
178178
/// [`MANTISSA_DIGITS`]: f128::MANTISSA_DIGITS
179179
#[unstable(feature = "f128", issue = "116909")]
180+
#[rustc_diagnostic_item = "f128_epsilon"]
180181
pub const EPSILON: f128 = 1.92592994438723585305597794258492732e-34_f128;
181182

182183
/// Smallest finite `f128` value.

library/core/src/num/f16.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ impl f16 {
174174
/// [Machine epsilon]: https://en.wikipedia.org/wiki/Machine_epsilon
175175
/// [`MANTISSA_DIGITS`]: f16::MANTISSA_DIGITS
176176
#[unstable(feature = "f16", issue = "116909")]
177+
#[rustc_diagnostic_item = "f16_epsilon"]
177178
pub const EPSILON: f16 = 9.7656e-4_f16;
178179

179180
/// Smallest finite `f16` value.

library/core/src/slice/ascii.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,7 @@ const fn is_ascii(bytes: &[u8]) -> bool {
478478

479479
let mut i = 0;
480480

481+
#[safety::loop_invariant(i <= bytes.len())]
481482
while i + CHUNK_SIZE <= bytes.len() {
482483
let chunk_end = i + CHUNK_SIZE;
483484

@@ -486,6 +487,7 @@ const fn is_ascii(bytes: &[u8]) -> bool {
486487
// ASCII bytes are less than 128 (0x80), so their most significant
487488
// bit is unset.
488489
let mut count = 0;
490+
#[safety::loop_invariant(i <= chunk_end && chunk_end - i <= CHUNK_SIZE && i - (chunk_end - CHUNK_SIZE) >= count as usize)]
489491
while i < chunk_end {
490492
count += bytes[i].is_ascii() as u8;
491493
i += 1;
@@ -499,6 +501,7 @@ const fn is_ascii(bytes: &[u8]) -> bool {
499501

500502
// Process the remaining `bytes.len() % N` bytes.
501503
let mut is_ascii = true;
504+
#[safety::loop_invariant(i <= bytes.len())]
502505
while i < bytes.len() {
503506
is_ascii &= bytes[i].is_ascii();
504507
i += 1;
@@ -514,6 +517,10 @@ pub mod verify {
514517

515518
#[kani::proof]
516519
#[kani::unwind(8)]
520+
// FIXME: the loop invariant in the x_64 & sse2 version of is_ascii
521+
// fails because Kani does not yet support modifies clauses for loop invariants.
522+
// Once it does, remove this cfg.
523+
#[cfg(not(all(target_arch = "x86_64", target_feature = "sse2")))]
517524
pub fn check_is_ascii() {
518525
if kani::any() {
519526
// TODO: ARR_SIZE can be much larger with cbmc argument

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
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-06-02"
5+
channel = "nightly-2025-06-03"
66
components = ["llvm-tools-preview", "rustc-dev", "rust-src", "rustfmt"]

scripts/check_rustc.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,15 @@ else
112112
fi
113113
fi
114114

115+
# TODO: this logic is broken because the stage 0 bootstrap sequence was redesigned, c.f. https://blog.rust-lang.org/inside-rust/2025/05/29/redesigning-the-initial-bootstrap-sequence/
116+
# However, changing the command to --stage 1 as suggested does not work; the compiler complains that there is an old version of the `safety` crate
117+
# compiled by the beta compiler. For now, comment it out and see if continued work on this feature (e.g. https://github.com/rust-lang/rust/pull/142002) fixes it.
115118
# Run tests
116-
cd "$TMP_RUST_DIR"
117-
echo "Running tests..."
118-
./x test --stage 0 library/std
119+
# cd "$TMP_RUST_DIR"
120+
# echo "Running tests..."
121+
# ./x test --stage 0 library/std
119122

120-
echo "Tests completed."
123+
# echo "Tests completed."
121124

122125
# Clean up the temporary directory
123126
rm -rf "$TMP_RUST_DIR"

tool_config/kani-version.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# incompatible with the verify-std repo.
33

44
[kani]
5-
commit = "ef6ad3b518676c3492ca5871ea61a441bb1d5b1e"
5+
commit = "931661b0cdbf9354eba3902608efadad00b1cbb3"

0 commit comments

Comments
 (0)