Skip to content

Commit f8272af

Browse files
author
The Miri Cronjob Bot
committed
Merge ref '4c7749e8c8e5' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: 4c7749e Filtered ref: 9742b5940dcb4aea810f9ce020a92b3f72ed7bb4 This merge was created using https://github.com/rust-lang/josh-sync.
2 parents 9ae91f0 + 7b8e489 commit f8272af

File tree

267 files changed

+6517
-5921
lines changed

Some content is hidden

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

267 files changed

+6517
-5921
lines changed

alloc/src/collections/btree/map.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,7 @@ impl<'a, K: 'a, V: 'a> Default for Iter<'a, K, V> {
382382
/// documentation for more.
383383
///
384384
/// [`iter_mut`]: BTreeMap::iter_mut
385+
#[must_use = "iterators are lazy and do nothing unless consumed"]
385386
#[stable(feature = "rust1", since = "1.0.0")]
386387
pub struct IterMut<'a, K: 'a, V: 'a> {
387388
range: LazyLeafRange<marker::ValMut<'a>, K, V>,
@@ -391,7 +392,6 @@ pub struct IterMut<'a, K: 'a, V: 'a> {
391392
_marker: PhantomData<&'a mut (K, V)>,
392393
}
393394

394-
#[must_use = "iterators are lazy and do nothing unless consumed"]
395395
#[stable(feature = "collection_debug", since = "1.17.0")]
396396
impl<K: fmt::Debug, V: fmt::Debug> fmt::Debug for IterMut<'_, K, V> {
397397
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {

alloc/src/ffi/c_str.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1099,7 +1099,7 @@ impl From<&CStr> for CString {
10991099
}
11001100
}
11011101

1102-
#[stable(feature = "c_string_eq_c_str", since = "CURRENT_RUSTC_VERSION")]
1102+
#[stable(feature = "c_string_eq_c_str", since = "1.90.0")]
11031103
impl PartialEq<CStr> for CString {
11041104
#[inline]
11051105
fn eq(&self, other: &CStr) -> bool {
@@ -1112,7 +1112,7 @@ impl PartialEq<CStr> for CString {
11121112
}
11131113
}
11141114

1115-
#[stable(feature = "c_string_eq_c_str", since = "CURRENT_RUSTC_VERSION")]
1115+
#[stable(feature = "c_string_eq_c_str", since = "1.90.0")]
11161116
impl PartialEq<&CStr> for CString {
11171117
#[inline]
11181118
fn eq(&self, other: &&CStr) -> bool {
@@ -1126,7 +1126,7 @@ impl PartialEq<&CStr> for CString {
11261126
}
11271127

11281128
#[cfg(not(no_global_oom_handling))]
1129-
#[stable(feature = "c_string_eq_c_str", since = "CURRENT_RUSTC_VERSION")]
1129+
#[stable(feature = "c_string_eq_c_str", since = "1.90.0")]
11301130
impl PartialEq<Cow<'_, CStr>> for CString {
11311131
#[inline]
11321132
fn eq(&self, other: &Cow<'_, CStr>) -> bool {
@@ -1221,7 +1221,7 @@ impl CStr {
12211221
}
12221222
}
12231223

1224-
#[stable(feature = "c_string_eq_c_str", since = "CURRENT_RUSTC_VERSION")]
1224+
#[stable(feature = "c_string_eq_c_str", since = "1.90.0")]
12251225
impl PartialEq<CString> for CStr {
12261226
#[inline]
12271227
fn eq(&self, other: &CString) -> bool {
@@ -1235,7 +1235,7 @@ impl PartialEq<CString> for CStr {
12351235
}
12361236

12371237
#[cfg(not(no_global_oom_handling))]
1238-
#[stable(feature = "c_string_eq_c_str", since = "CURRENT_RUSTC_VERSION")]
1238+
#[stable(feature = "c_string_eq_c_str", since = "1.90.0")]
12391239
impl PartialEq<Cow<'_, Self>> for CStr {
12401240
#[inline]
12411241
fn eq(&self, other: &Cow<'_, Self>) -> bool {
@@ -1249,7 +1249,7 @@ impl PartialEq<Cow<'_, Self>> for CStr {
12491249
}
12501250

12511251
#[cfg(not(no_global_oom_handling))]
1252-
#[stable(feature = "c_string_eq_c_str", since = "CURRENT_RUSTC_VERSION")]
1252+
#[stable(feature = "c_string_eq_c_str", since = "1.90.0")]
12531253
impl PartialEq<CStr> for Cow<'_, CStr> {
12541254
#[inline]
12551255
fn eq(&self, other: &CStr) -> bool {
@@ -1263,7 +1263,7 @@ impl PartialEq<CStr> for Cow<'_, CStr> {
12631263
}
12641264

12651265
#[cfg(not(no_global_oom_handling))]
1266-
#[stable(feature = "c_string_eq_c_str", since = "CURRENT_RUSTC_VERSION")]
1266+
#[stable(feature = "c_string_eq_c_str", since = "1.90.0")]
12671267
impl PartialEq<&CStr> for Cow<'_, CStr> {
12681268
#[inline]
12691269
fn eq(&self, other: &&CStr) -> bool {
@@ -1277,7 +1277,7 @@ impl PartialEq<&CStr> for Cow<'_, CStr> {
12771277
}
12781278

12791279
#[cfg(not(no_global_oom_handling))]
1280-
#[stable(feature = "c_string_eq_c_str", since = "CURRENT_RUSTC_VERSION")]
1280+
#[stable(feature = "c_string_eq_c_str", since = "1.90.0")]
12811281
impl PartialEq<CString> for Cow<'_, CStr> {
12821282
#[inline]
12831283
fn eq(&self, other: &CString) -> bool {

compiler-builtins/.github/workflows/main.yaml

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ jobs:
3434
- name: Fetch pull request ref
3535
run: git fetch origin "$GITHUB_REF:$GITHUB_REF"
3636
if: github.event_name == 'pull_request'
37-
- run: python3 ci/ci-util.py generate-matrix >> "$GITHUB_OUTPUT"
37+
- run: |
38+
set -eo pipefail # Needed to actually fail the job if ci-util fails
39+
python3 ci/ci-util.py generate-matrix | tee "$GITHUB_OUTPUT"
3840
id: script
3941
4042
test:
@@ -50,7 +52,6 @@ jobs:
5052
os: ubuntu-24.04-arm
5153
- target: aarch64-pc-windows-msvc
5254
os: windows-2025
53-
test_verbatim: 1
5455
build_only: 1
5556
- target: arm-unknown-linux-gnueabi
5657
os: ubuntu-24.04
@@ -70,8 +71,12 @@ jobs:
7071
os: ubuntu-24.04
7172
- target: powerpc64le-unknown-linux-gnu
7273
os: ubuntu-24.04
74+
- target: powerpc64le-unknown-linux-gnu
75+
os: ubuntu-24.04-ppc64le
7376
- target: riscv64gc-unknown-linux-gnu
7477
os: ubuntu-24.04
78+
- target: s390x-unknown-linux-gnu
79+
os: ubuntu-24.04-s390x
7580
- target: thumbv6m-none-eabi
7681
os: ubuntu-24.04
7782
- target: thumbv7em-none-eabi
@@ -88,10 +93,8 @@ jobs:
8893
os: macos-13
8994
- target: i686-pc-windows-msvc
9095
os: windows-2025
91-
test_verbatim: 1
9296
- target: x86_64-pc-windows-msvc
9397
os: windows-2025
94-
test_verbatim: 1
9598
- target: i686-pc-windows-gnu
9699
os: windows-2025
97100
channel: nightly-i686-gnu
@@ -102,11 +105,23 @@ jobs:
102105
needs: [calculate_vars]
103106
env:
104107
BUILD_ONLY: ${{ matrix.build_only }}
105-
TEST_VERBATIM: ${{ matrix.test_verbatim }}
106108
MAY_SKIP_LIBM_CI: ${{ needs.calculate_vars.outputs.may_skip_libm_ci }}
107109
steps:
110+
- name: Print $HOME
111+
shell: bash
112+
run: |
113+
set -x
114+
echo "${HOME:-not found}"
115+
pwd
116+
printenv
108117
- name: Print runner information
109118
run: uname -a
119+
120+
# Native ppc and s390x runners don't have rustup by default
121+
- name: Install rustup
122+
if: matrix.os == 'ubuntu-24.04-ppc64le' || matrix.os == 'ubuntu-24.04-s390x'
123+
run: sudo apt-get update && sudo apt-get install -y rustup
124+
110125
- uses: actions/checkout@v4
111126
- name: Install Rust (rustup)
112127
shell: bash
@@ -117,7 +132,12 @@ jobs:
117132
rustup update "$channel" --no-self-update
118133
rustup default "$channel"
119134
rustup target add "${{ matrix.target }}"
135+
136+
# Our scripts use nextest if possible. This is skipped on the native ppc
137+
# and s390x runners since install-action doesn't support them.
120138
- uses: taiki-e/install-action@nextest
139+
if: "!(matrix.os == 'ubuntu-24.04-ppc64le' || matrix.os == 'ubuntu-24.04-s390x')"
140+
121141
- uses: Swatinem/rust-cache@v2
122142
with:
123143
key: ${{ matrix.target }}
@@ -144,7 +164,7 @@ jobs:
144164
shell: bash
145165
- run: echo "RUST_COMPILER_RT_ROOT=$(realpath ./compiler-rt)" >> "$GITHUB_ENV"
146166
shell: bash
147-
167+
148168
- name: Download musl source
149169
run: ./ci/update-musl.sh
150170
shell: bash
@@ -256,7 +276,7 @@ jobs:
256276
with:
257277
name: ${{ env.BASELINE_NAME }}
258278
path: ${{ env.BASELINE_NAME }}.tar.xz
259-
279+
260280
- name: Run wall time benchmarks
261281
run: |
262282
# Always use the same seed for benchmarks. Ideally we should switch to a
@@ -311,8 +331,8 @@ jobs:
311331
timeout-minutes: 10
312332
steps:
313333
- uses: actions/checkout@v4
314-
- name: Install stable `rustfmt`
315-
run: rustup set profile minimal && rustup default stable && rustup component add rustfmt
334+
- name: Install nightly `rustfmt`
335+
run: rustup set profile minimal && rustup default nightly && rustup component add rustfmt
316336
- run: cargo fmt -- --check
317337

318338
extensive:

compiler-builtins/.github/workflows/rustc-pull.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,13 @@ jobs:
1212
if: github.repository == 'rust-lang/compiler-builtins'
1313
uses: rust-lang/josh-sync/.github/workflows/rustc-pull.yml@main
1414
with:
15+
github-app-id: ${{ vars.APP_CLIENT_ID }}
1516
# https://rust-lang.zulipchat.com/#narrow/channel/219381-t-libs/topic/compiler-builtins.20subtree.20sync.20automation/with/528482375
1617
zulip-stream-id: 219381
1718
zulip-topic: 'compiler-builtins subtree sync automation'
18-
zulip-bot-email: "compiler-builtins-ci-bot@rust-lang.zulipchat.com"
19+
zulip-bot-email: "compiler-builtins-ci-bot@rust-lang.zulipchat.com"
1920
pr-base-branch: master
2021
branch-name: rustc-pull
2122
secrets:
2223
zulip-api-token: ${{ secrets.ZULIP_API_TOKEN }}
23-
token: ${{ secrets.GITHUB_TOKEN }}
24+
github-app-secret: ${{ secrets.APP_PRIVATE_KEY }}

compiler-builtins/builtins-shim/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ default = ["compiler-builtins"]
3737
# implementations and also filling in unimplemented intrinsics
3838
c = ["dep:cc"]
3939

40-
# Workaround for the Cranelift codegen backend. Disables any implementations
41-
# which use inline assembly and fall back to pure Rust versions (if available).
40+
# For implementations where there is both a generic version and a platform-
41+
# specific version, use the generic version. This is meant to enable testing
42+
# the generic versions on all platforms.
4243
no-asm = []
4344

4445
# Workaround for codegen backends which haven't yet implemented `f16` and

compiler-builtins/builtins-test-intrinsics/src/main.rs

Lines changed: 16 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,7 @@ mod intrinsics {
4040
x as f64
4141
}
4242

43-
#[cfg(all(
44-
f16_enabled,
45-
f128_enabled,
46-
not(any(target_arch = "powerpc", target_arch = "powerpc64"))
47-
))]
43+
#[cfg(all(f16_enabled, f128_enabled))]
4844
pub fn extendhftf(x: f16) -> f128 {
4945
x as f128
5046
}
@@ -201,11 +197,7 @@ mod intrinsics {
201197

202198
/* f128 operations */
203199

204-
#[cfg(all(
205-
f16_enabled,
206-
f128_enabled,
207-
not(any(target_arch = "powerpc", target_arch = "powerpc64"))
208-
))]
200+
#[cfg(all(f16_enabled, f128_enabled))]
209201
pub fn trunctfhf(x: f128) -> f16 {
210202
x as f16
211203
}
@@ -220,50 +212,32 @@ mod intrinsics {
220212
x as f64
221213
}
222214

223-
#[cfg(all(
224-
f128_enabled,
225-
not(any(target_arch = "powerpc", target_arch = "powerpc64"))
226-
))]
215+
#[cfg(f128_enabled)]
227216
pub fn fixtfsi(x: f128) -> i32 {
228217
x as i32
229218
}
230219

231-
#[cfg(all(
232-
f128_enabled,
233-
not(any(target_arch = "powerpc", target_arch = "powerpc64"))
234-
))]
220+
#[cfg(f128_enabled)]
235221
pub fn fixtfdi(x: f128) -> i64 {
236222
x as i64
237223
}
238224

239-
#[cfg(all(
240-
f128_enabled,
241-
not(any(target_arch = "powerpc", target_arch = "powerpc64"))
242-
))]
225+
#[cfg(f128_enabled)]
243226
pub fn fixtfti(x: f128) -> i128 {
244227
x as i128
245228
}
246229

247-
#[cfg(all(
248-
f128_enabled,
249-
not(any(target_arch = "powerpc", target_arch = "powerpc64"))
250-
))]
230+
#[cfg(f128_enabled)]
251231
pub fn fixunstfsi(x: f128) -> u32 {
252232
x as u32
253233
}
254234

255-
#[cfg(all(
256-
f128_enabled,
257-
not(any(target_arch = "powerpc", target_arch = "powerpc64"))
258-
))]
235+
#[cfg(f128_enabled)]
259236
pub fn fixunstfdi(x: f128) -> u64 {
260237
x as u64
261238
}
262239

263-
#[cfg(all(
264-
f128_enabled,
265-
not(any(target_arch = "powerpc", target_arch = "powerpc64"))
266-
))]
240+
#[cfg(f128_enabled)]
267241
pub fn fixunstfti(x: f128) -> u128 {
268242
x as u128
269243
}
@@ -540,47 +514,25 @@ fn run() {
540514
bb(extendhfdf(bb(2.)));
541515
#[cfg(f16_enabled)]
542516
bb(extendhfsf(bb(2.)));
543-
#[cfg(all(
544-
f16_enabled,
545-
f128_enabled,
546-
not(any(target_arch = "powerpc", target_arch = "powerpc64"))
547-
))]
517+
#[cfg(all(f16_enabled, f128_enabled))]
548518
bb(extendhftf(bb(2.)));
549519
#[cfg(f128_enabled)]
550520
bb(extendsftf(bb(2.)));
551521
bb(fixdfti(bb(2.)));
552522
bb(fixsfti(bb(2.)));
553-
#[cfg(all(
554-
f128_enabled,
555-
not(any(target_arch = "powerpc", target_arch = "powerpc64"))
556-
))]
523+
#[cfg(f128_enabled)]
557524
bb(fixtfdi(bb(2.)));
558-
#[cfg(all(
559-
f128_enabled,
560-
not(any(target_arch = "powerpc", target_arch = "powerpc64"))
561-
))]
525+
#[cfg(f128_enabled)]
562526
bb(fixtfsi(bb(2.)));
563-
#[cfg(all(
564-
f128_enabled,
565-
not(any(target_arch = "powerpc", target_arch = "powerpc64"))
566-
))]
527+
#[cfg(f128_enabled)]
567528
bb(fixtfti(bb(2.)));
568529
bb(fixunsdfti(bb(2.)));
569530
bb(fixunssfti(bb(2.)));
570-
#[cfg(all(
571-
f128_enabled,
572-
not(any(target_arch = "powerpc", target_arch = "powerpc64"))
573-
))]
531+
#[cfg(f128_enabled)]
574532
bb(fixunstfdi(bb(2.)));
575-
#[cfg(all(
576-
f128_enabled,
577-
not(any(target_arch = "powerpc", target_arch = "powerpc64"))
578-
))]
533+
#[cfg(f128_enabled)]
579534
bb(fixunstfsi(bb(2.)));
580-
#[cfg(all(
581-
f128_enabled,
582-
not(any(target_arch = "powerpc", target_arch = "powerpc64"))
583-
))]
535+
#[cfg(f128_enabled)]
584536
bb(fixunstfti(bb(2.)));
585537
#[cfg(f128_enabled)]
586538
bb(floatditf(bb(2)));
@@ -616,11 +568,7 @@ fn run() {
616568
bb(truncsfhf(bb(2.)));
617569
#[cfg(f128_enabled)]
618570
bb(trunctfdf(bb(2.)));
619-
#[cfg(all(
620-
f16_enabled,
621-
f128_enabled,
622-
not(any(target_arch = "powerpc", target_arch = "powerpc64"))
623-
))]
571+
#[cfg(all(f16_enabled, f128_enabled))]
624572
bb(trunctfhf(bb(2.)));
625573
#[cfg(f128_enabled)]
626574
bb(trunctfsf(bb(2.)));

0 commit comments

Comments
 (0)