Skip to content

Commit 177d0fd

Browse files
github-actions[bot]hkBstrocurleyRalfJungjoshtriplett
authored
Merge subtree update for toolchain nightly-2025-07-30 (#432)
This is an automated PR to merge library subtree updates from 2025-07-21 (rust-lang/rust@9982d64) to 2025-07-30 (rust-lang/rust@ba7e63b) (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: 2f8dad2 --------- Signed-off-by: xizheyin <[email protected]> Signed-off-by: Ayush Singh <[email protected]> Co-authored-by: Marijn Schouten <[email protected]> Co-authored-by: Roger Curley <[email protected]> Co-authored-by: Ralf Jung <[email protected]> Co-authored-by: Josh Triplett <[email protected]> Co-authored-by: Matthias Krüger <[email protected]> Co-authored-by: Folkert de Vries <[email protected]> Co-authored-by: okaneco <[email protected]> Co-authored-by: Folkert de Vries <[email protected]> Co-authored-by: Sayantan Chakraborty <[email protected]> Co-authored-by: nazo6 <[email protected]> Co-authored-by: bors <[email protected]> Co-authored-by: Jakub Beránek <[email protected]> Co-authored-by: Orson Peters <[email protected]> Co-authored-by: León Orell Valerian Liehr <[email protected]> Co-authored-by: xizheyin <[email protected]> Co-authored-by: Deadbeef <[email protected]> Co-authored-by: René Kijewski <[email protected]> Co-authored-by: Nik Revenco <[email protected]> Co-authored-by: The Miri Cronjob Bot <[email protected]> Co-authored-by: Tim (Theemathas) Chirananthavat <[email protected]> Co-authored-by: Chris Denton <[email protected]> Co-authored-by: Samuel Tardieu <[email protected]> Co-authored-by: Travis Cross <[email protected]> Co-authored-by: Amanieu d'Antras <[email protected]> Co-authored-by: Oli Scherer <[email protected]> Co-authored-by: David Mládek <[email protected]> Co-authored-by: SunkenPotato <[email protected]> Co-authored-by: Cameron Steffen <[email protected]> Co-authored-by: Martin Ombura Jr <[email protected]> Co-authored-by: Madhav Madhusoodanan <[email protected]> Co-authored-by: sayantn <[email protected]> Co-authored-by: Trevor Gross <[email protected]> Co-authored-by: WANG Rui <[email protected]> Co-authored-by: Luigi Sartor Piucco <[email protected]> Co-authored-by: Julien THILLARD <[email protected]> Co-authored-by: The rustc-josh-sync Cronjob Bot <[email protected]> Co-authored-by: usamoi <[email protected]> Co-authored-by: Rémy Rakic <[email protected]> Co-authored-by: Nurzhan Sakén <[email protected]> Co-authored-by: ltdk <[email protected]> Co-authored-by: bjorn3 <[email protected]> Co-authored-by: Guillaume Gomez <[email protected]> Co-authored-by: Evgenii Zheltonozhskii <[email protected]> Co-authored-by: roblabla <[email protected]> Co-authored-by: 许杰友 Jieyou Xu (Joe) <[email protected]> Co-authored-by: Ayush Singh <[email protected]> Co-authored-by: Kornel <[email protected]> Co-authored-by: Jonas Platte <[email protected]> Co-authored-by: Alex Crichton <[email protected]> Co-authored-by: Zachary S <[email protected]> Co-authored-by: Jeremy Smart <[email protected]> Co-authored-by: Ivan Tadeu Ferreira Antunes Filho <[email protected]> Co-authored-by: Alisa Sireneva <[email protected]> Co-authored-by: Trevor Gross <[email protected]> Co-authored-by: Jacob Pratt <[email protected]> Co-authored-by: Scott McMurray <[email protected]> Co-authored-by: xonx <[email protected]> Co-authored-by: Yosh <[email protected]> Co-authored-by: joboet <[email protected]> Co-authored-by: Stuart Cook <[email protected]> Co-authored-by: Connor Tsui <[email protected]> Co-authored-by: Aandreba <[email protected]> Co-authored-by: Lucas Werkmeister <[email protected]> Co-authored-by: gitbot <git@bot> Co-authored-by: Michael Tautschnig <[email protected]>
1 parent 71c5bf3 commit 177d0fd

File tree

235 files changed

+6901
-7305
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

235 files changed

+6901
-7305
lines changed

library/Cargo.lock

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

library/alloc/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ safety = { path = "../contracts/safety" }
2222
[features]
2323
compiler-builtins-mem = ['compiler_builtins/mem']
2424
compiler-builtins-c = ["compiler_builtins/c"]
25-
compiler-builtins-no-asm = ["compiler_builtins/no-asm"]
2625
compiler-builtins-no-f16-f128 = ["compiler_builtins/no-f16-f128"]
27-
compiler-builtins-mangled-names = ["compiler_builtins/mangled-names"]
2826
# Make panics and failed asserts immediately abort without formatting any message
2927
panic_immediate_abort = ["core/panic_immediate_abort"]
3028
# Choose algorithms that are optimized for binary size instead of runtime performance

library/alloc/src/collections/vec_deque/drain.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ impl<T, A: Allocator> Drop for Drain<'_, T, A> {
192192
// this branch is never taken.
193193
// We use `#[cold]` instead of `#[inline(never)]`, because inlining this
194194
// function into the general case (`.drain(n..m)`) is fine.
195-
// See `tests/codegen/vecdeque-drain.rs` for a test.
195+
// See `tests/codegen-llvm/vecdeque-drain.rs` for a test.
196196
#[cold]
197197
fn join_head_and_tail_wrapping<T, A: Allocator>(
198198
source_deque: &mut VecDeque<T, A>,

library/alloc/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@
9595
#![cfg_attr(kani, feature(kani))]
9696
#![feature(alloc_layout_extra)]
9797
#![feature(allocator_api)]
98-
#![feature(array_chunks)]
9998
#![feature(array_into_iter_constructors)]
10099
#![feature(array_windows)]
101100
#![feature(ascii_char)]

library/alloc/src/raw_vec/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,7 @@ impl<A: Allocator> RawVecInner<A> {
761761
}
762762

763763
// not marked inline(never) since we want optimizers to be able to observe the specifics of this
764-
// function, see tests/codegen/vec-reserve-extend.rs.
764+
// function, see tests/codegen-llvm/vec-reserve-extend.rs.
765765
#[cold]
766766
fn finish_grow<A>(
767767
new_layout: Layout,

library/alloc/src/slice.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ use core::cmp::Ordering::{self, Less};
1616
use core::mem::MaybeUninit;
1717
#[cfg(not(no_global_oom_handling))]
1818
use core::ptr;
19-
#[unstable(feature = "array_chunks", issue = "74985")]
20-
pub use core::slice::ArrayChunks;
21-
#[unstable(feature = "array_chunks", issue = "74985")]
22-
pub use core::slice::ArrayChunksMut;
2319
#[unstable(feature = "array_windows", issue = "75027")]
2420
pub use core::slice::ArrayWindows;
2521
#[stable(feature = "inherent_ascii_escape", since = "1.60.0")]

library/alloc/src/string.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -787,12 +787,12 @@ impl String {
787787
#[cfg(not(no_global_oom_handling))]
788788
#[unstable(feature = "str_from_utf16_endian", issue = "116258")]
789789
pub fn from_utf16le(v: &[u8]) -> Result<String, FromUtf16Error> {
790-
if v.len() % 2 != 0 {
790+
let (chunks, []) = v.as_chunks::<2>() else {
791791
return Err(FromUtf16Error(()));
792-
}
792+
};
793793
match (cfg!(target_endian = "little"), unsafe { v.align_to::<u16>() }) {
794794
(true, ([], v, [])) => Self::from_utf16(v),
795-
_ => char::decode_utf16(v.array_chunks::<2>().copied().map(u16::from_le_bytes))
795+
_ => char::decode_utf16(chunks.iter().copied().map(u16::from_le_bytes))
796796
.collect::<Result<_, _>>()
797797
.map_err(|_| FromUtf16Error(())),
798798
}
@@ -830,11 +830,11 @@ impl String {
830830
(true, ([], v, [])) => Self::from_utf16_lossy(v),
831831
(true, ([], v, [_remainder])) => Self::from_utf16_lossy(v) + "\u{FFFD}",
832832
_ => {
833-
let mut iter = v.array_chunks::<2>();
834-
let string = char::decode_utf16(iter.by_ref().copied().map(u16::from_le_bytes))
833+
let (chunks, remainder) = v.as_chunks::<2>();
834+
let string = char::decode_utf16(chunks.iter().copied().map(u16::from_le_bytes))
835835
.map(|r| r.unwrap_or(char::REPLACEMENT_CHARACTER))
836836
.collect();
837-
if iter.remainder().is_empty() { string } else { string + "\u{FFFD}" }
837+
if remainder.is_empty() { string } else { string + "\u{FFFD}" }
838838
}
839839
}
840840
}
@@ -862,12 +862,12 @@ impl String {
862862
#[cfg(not(no_global_oom_handling))]
863863
#[unstable(feature = "str_from_utf16_endian", issue = "116258")]
864864
pub fn from_utf16be(v: &[u8]) -> Result<String, FromUtf16Error> {
865-
if v.len() % 2 != 0 {
865+
let (chunks, []) = v.as_chunks::<2>() else {
866866
return Err(FromUtf16Error(()));
867-
}
867+
};
868868
match (cfg!(target_endian = "big"), unsafe { v.align_to::<u16>() }) {
869869
(true, ([], v, [])) => Self::from_utf16(v),
870-
_ => char::decode_utf16(v.array_chunks::<2>().copied().map(u16::from_be_bytes))
870+
_ => char::decode_utf16(chunks.iter().copied().map(u16::from_be_bytes))
871871
.collect::<Result<_, _>>()
872872
.map_err(|_| FromUtf16Error(())),
873873
}
@@ -905,11 +905,11 @@ impl String {
905905
(true, ([], v, [])) => Self::from_utf16_lossy(v),
906906
(true, ([], v, [_remainder])) => Self::from_utf16_lossy(v) + "\u{FFFD}",
907907
_ => {
908-
let mut iter = v.array_chunks::<2>();
909-
let string = char::decode_utf16(iter.by_ref().copied().map(u16::from_be_bytes))
908+
let (chunks, remainder) = v.as_chunks::<2>();
909+
let string = char::decode_utf16(chunks.iter().copied().map(u16::from_be_bytes))
910910
.map(|r| r.unwrap_or(char::REPLACEMENT_CHARACTER))
911911
.collect();
912-
if iter.remainder().is_empty() { string } else { string + "\u{FFFD}" }
912+
if remainder.is_empty() { string } else { string + "\u{FFFD}" }
913913
}
914914
}
915915
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Perform a subtree sync (pull) using the josh-sync tool once every few days (or on demand).
2+
name: rustc-pull
3+
4+
on:
5+
workflow_dispatch:
6+
schedule:
7+
# Run at 04:00 UTC every Monday and Thursday
8+
- cron: '0 4 * * 1,4'
9+
10+
jobs:
11+
pull:
12+
if: github.repository == 'rust-lang/compiler-builtins'
13+
uses: rust-lang/josh-sync/.github/workflows/rustc-pull.yml@main
14+
with:
15+
# https://rust-lang.zulipchat.com/#narrow/channel/219381-t-libs/topic/compiler-builtins.20subtree.20sync.20automation/with/528482375
16+
zulip-stream-id: 219381
17+
zulip-topic: 'compiler-builtins subtree sync automation'
18+
zulip-bot-email: "[email protected]"
19+
pr-base-branch: master
20+
branch-name: rustc-pull
21+
secrets:
22+
zulip-api-token: ${{ secrets.ZULIP_API_TOKEN }}
23+
token: ${{ secrets.GITHUB_TOKEN }}

library/compiler-builtins/CONTRIBUTING.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,3 +165,12 @@ cargo bench --no-default-features \
165165

166166
[`iai-callgrind-runner`]: https://crates.io/crates/iai-callgrind-runner
167167
[Valgrind]: https://valgrind.org/
168+
169+
## Subtree synchronization
170+
171+
`compiler-builtins` is included as a [Josh subtree] in the main compiler
172+
repository (`rust-lang/rust`). You can find a guide on how to create synchronization
173+
(pull and push) PRs at the [`rustc-dev-guide` page].
174+
175+
[Josh subtree]: https://rustc-dev-guide.rust-lang.org/external-repos.html#josh-subtrees
176+
[`rustc-dev-guide` page]: https://rustc-dev-guide.rust-lang.org/external-repos.html#synchronizing-a-josh-subtree

library/compiler-builtins/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ resolver = "2"
33
members = [
44
"builtins-shim",
55
"builtins-test",
6-
"crates/josh-sync",
76
"crates/libm-macros",
87
"crates/musl-math-sys",
98
"crates/panic-handler",

0 commit comments

Comments
 (0)