Skip to content

Rollup of 7 pull requests - #161801

Merged
rust-bors[bot] merged 23 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-1gIULVU
Aug 26, 2026
Merged

Rollup of 7 pull requests#161801
rust-bors[bot] merged 23 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-1gIULVU

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

ettolrach and others added 23 commits August 24, 2026 13:06
The file path was changed in af4c79b. Fix the link, and use a specific commit so it doesn't break accidentally future.
Due to some bad ordering of session/config initialization code -- more
about that in subsequent commits -- `cfg(target_has_threads)` fails to
be set for the `wasm32-unknown-unknown` platform when
`-Ctarget-feature=+atomics` is specified. This commit modifies a test to
demonstrate the bug; as written the test passes.
- `parse_check_cfg` has a single call site and is followed by
  a call to `fill_well_known`.

- `parse_cfg` has two call sites and in both cases is followed by
  a call to `build_configuration`.

This commit moves the follow-up calls into the functions, simplifying
`run_compiler`.
Currently it modifies the `Session` and the `Cfg` (and the `Cfg`
afterwards is put into the `Session`). It also takes a `CodegenBackend`.
Those are some heavyweight arguments.

This commit moves the `Session` modifications to the caller so the `&mut
Session` isn't necessary, and passes in the `TargetConfig` instead of
the whole `CodegenBackend`, plus some other small arguments.
`add_configuration` ends up more clearly about modifying the `Cfg`. This
is a step towards untangling session/backend initialization.
Currently, `parse_cfg` calls `build_configuration`, which calls
`default_configuration`, which calls
`sess.target.singlethread(&sess.internal_target_features)`. But
`sess.internal_target_features` hasn't been set at this point and is
empty!

This commit moves the setting of `sess.internal_target_features` before
the `parse_cfg` call to fix this ordering bug. This results in the
`cfg(target_has_threads)` being correctly set on
`wasm32-unknown-unknown` when `-Ctarget-feature=+atomics` is specified.

Note: I have plans to make this kind of ordering bug
difficult/impossible in a follow-up (e.g. rust-lang#161432).
`RawSpan`, `RawDefId`, and `RawDefPathHash` were all introduced to work
around the fact that `StableHashCtxt` in `rustc_data_structure` is
upstream of `rustc_span`. However, `DefPathHash` is just a newtype
around `Fingerprint`, which is defined  in `rustc_data_structure`. So by
working directly with `Fingerprint` we can remove `RawDefPathHash`,
which is a nice simplification.
had to update several tests which used repeated aligns and packeds. they
now produce both a warning and an error where appropriate (e.g. when
using conflicting packeds) which i think is correct.
… r=jdonszelmann

lint against repeated repr attributes

fixes rust-lang#156029 by adding a lint against repeated repr attributes.

r? scottmcm
…crum

panic_unwind: Use global_asm! for IMGREL relocations

Rust consteval cannot construct 32-bit values that contain the offset between two symbols, but this is required for panic_unwind on some architectures because unwinding on Windows SEH uses image-base-relative pointers for the panic information (which makes them fit in 32-bit rather than 64-bit).

Currently, this is worked around by initializing these globals on panic with atomic stores. This works, but is undefined behavior as the panic runtime reads the values with non-atomic loads, which leads to a data race.

Instead, utilize `global_asm!` to create the globals with `@IMGREL` relocations so that the linker constructs the relative pointers for us at link or load time.

For context: [#t-compiler > relative pointers in windows SEH panic_unwind @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/relative.20pointers.20in.20windows.20SEH.20panic_unwind/near/613200087)

AI assistance was involved with writing the assembly code.
Fix the wasm32-unknown-unknown target feature/cfg bug

Due to some bad ordering of session/config initialization code, `cfg(target_has_threads)` fails to be set for the `wasm32-unknown-unknown` platform when `-Ctarget-feature=+atomics` is specified. This PR fixes the problem. Details in individual commits.

r? @Mark-Simulacrum
Fix broken link to lang_items.rs in unstable book

The file path was changed in af4c79b. Fix the link, and use a specific commit so it doesn't break accidentally in future.
…ee1-dead

Remove `RawDefPathHash`

`RawSpan`, `RawDefId`, and `RawDefPathHash` were all introduced to work around the fact that `StableHashCtxt` in `rustc_data_structure` is upstream of `rustc_span`. However, `DefPathHash` is just a newtype around `Fingerprint`, which is defined  in `rustc_data_structure`. So by working directly with `Fingerprint` we can remove `RawDefPathHash`, which is a nice simplification.

r? @fee1-dead
explicitly state that allocations cannot grow to the left

This was already implied, but it seems better to make this explicit.

Cc @rust-lang/opsem
…, r=mu001999

Remove dead parse error recovery (underscores in expressions)

Back in rust-lang@b7f7756 (2019) the parser was extended to recover from `_`s as elements of tuple expressions (this was later extended to also cover call expressions). At the time, `_` obviously wasn't an expression yet.

Nowadays `parse_expr_res` will *always* successfully parse `_` as an `ExprKind::Underscore` (irrespective of the passed `Restrictions`). Consequently, we will never reach the special case in `parse_expr_catch_underscore`. Drop this entire wrapper function.

<sub>(No LLM was or will be used by me during the entire creation process of this PR)</sub>
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Aug 26, 2026
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-run-make Area: port run-make Makefiles to rmake.rs S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Aug 26, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@bors r+ p=5

@rust-bors

rust-bors Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 0ae3fd9 has been approved by JonathanBrouwer

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 26, 2026
@rust-bors

This comment has been minimized.

@rust-bors rust-bors Bot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 26, 2026
@rust-bors

rust-bors Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: JonathanBrouwer
Duration: 3h 28m 46s
Pushing 3ffb26f to main...

@rust-bors
rust-bors Bot merged commit 3ffb26f into rust-lang:main Aug 26, 2026
14 checks passed
@rustbot rustbot added this to the 1.100.0 milestone Aug 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor
What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 6510953 (parent) -> 3ffb26f (this PR)

Test differences

Show 655 test diffs

Stage 1

  • [ui] tests/ui/repr/repr-repeated-attrs.rs: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/repr/repr-repeated-attrs.rs: [missing] -> pass (J1)

Stage 2

  • [ui] tests/ui/repr/repr-repeated-attrs.rs: [missing] -> pass (J2)

Additionally, 652 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 3ffb26fbf5bf232cf59e314e75ea325973f4f583 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. x86_64-gnu-stdlib-semver-check: 8m 29s -> 17m 36s (+107.5%)
  2. x86_64-gnu-parallel-frontend: 1h 20m -> 2h (+49.8%)
  3. dist-x86_64-llvm-mingw: 1h 30m -> 2h 13m (+47.6%)
  4. x86_64-gnu-llvm-22-1: 55m 25s -> 1h 21m (+47.2%)
  5. dist-aarch64-linux: 2h 23m -> 3h 27m (+44.8%)
  6. x86_64-gnu-nopt: 1h 46m -> 2h 26m (+36.9%)
  7. armhf-gnu: 1h 29m -> 56m 39s (-36.9%)
  8. i686-gnu-1: 1h 37m -> 2h 12m (+35.4%)
  9. aarch64-apple-1: 1h 49m -> 2h 25m (+32.4%)
  10. x86_64-gnu-debug: 1h 33m -> 2h 2m (+31.5%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (3ffb26f): comparison URL.

Overall result: ❌ regressions - please read:

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
0.3% [0.2%, 0.3%] 3
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.3% [0.2%, 0.3%] 3

Max RSS (memory usage)

Results (secondary -2.6%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.2% [3.0%, 3.2%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-5.0% [-8.1%, -3.5%] 7
All ❌✅ (primary) - - 0

Cycles

Results (secondary 2.6%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.6% [2.6%, 2.6%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

Results (primary -0.1%, secondary -0.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.1% [-0.2%, -0.0%] 45
Improvements ✅
(secondary)
-0.1% [-0.1%, -0.0%] 11
All ❌✅ (primary) -0.1% [-0.2%, -0.0%] 45

Bootstrap: 475.812s -> 476.994s (0.25%)
Artifact size: 403.37 MiB -> 402.58 MiB (-0.20%)

@rustbot rustbot added the perf-regression Performance regression. label Aug 26, 2026
@rust-bors

rust-bors Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#157036 lint against repeated repr attributes 39d59b8cc8a47e3bfd0035e5fde66bbbfc7dea77
(link)
#160183 panic_unwind: Use global_asm! for IMGREL relocations ae960b018e69c3df89a9421ddaf15e40a2606de0
(link)
#161718 Fix the wasm32-unknown-unknown target feature/cfg bug 8a6ec0cfc91be94a91fbfc8c16fd7c5f41823bd5
(link)
#161673 Fix broken link to lang_items.rs in unstable book 76a3160a5b0482a362020c966b600f1f0c16af77
(link)
#161744 Remove RawDefPathHash 4f30517f6b80854d4618ec832504ab0910c60cb5
(link)
#161747 explicitly state that allocations cannot grow to the left 1e8ebee66aae091b0e3e75aae98a7e9f772b3ae2
(link)
#161796 Remove dead parse error recovery (underscores in expression… ff197892f637f978be7c25e21c8dbc4e22dca370
(link)

parent commit: 6510953ce0

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@panstromek

Copy link
Copy Markdown
Contributor

These are the only ones that seem potentially relevant. libc contains a lot of reprs and DefPathHash is hot in incr builds.

@rust-timer triage 39d59b8 4f30517

@rust-timer

rust-timer commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

#157036 39d59b8 lint against repeated repr attributes

Instruction count

This perf run didn't have relevant results for this metric.

Max RSS (memory usage)

Results (secondary 2.2%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.2% [2.2%, 2.2%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

Results (primary 0.6%, secondary 2.8%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
3.4% [3.4%, 3.4%] 1
Regressions ❌
(secondary)
2.8% [2.8%, 2.8%] 1
Improvements ✅
(primary)
-2.1% [-2.1%, -2.1%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.6% [-2.1%, 3.4%] 2

Binary size

This perf run didn't have relevant results for this metric.


#161744 4f30517 Remove RawDefPathHash

Instruction count

This perf run didn't have relevant results for this metric.

Max RSS (memory usage)

Results (secondary -0.2%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.1% [1.0%, 5.7%] 5
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.1% [-5.2%, -2.3%] 3
All ❌✅ (primary) - - 0

Cycles

Results (primary 0.6%, secondary 0.9%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
3.4% [3.4%, 3.4%] 1
Regressions ❌
(secondary)
4.0% [4.0%, 4.0%] 1
Improvements ✅
(primary)
-2.1% [-2.1%, -2.1%] 1
Improvements ✅
(secondary)
-2.2% [-2.2%, -2.2%] 1
All ❌✅ (primary) 0.6% [-2.1%, 3.4%] 2

Binary size

This perf run didn't have relevant results for this metric.

@panstromek

Copy link
Copy Markdown
Contributor

@rust-timer triage ae960b0

@rust-timer

rust-timer commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

#160183 ae960b0 panic_unwind: Use global_asm! for IMGREL relocations

Instruction count

This perf run didn't have relevant results for this metric.

Max RSS (memory usage)

Results (primary 4.1%, secondary 1.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
4.1% [4.1%, 4.1%] 1
Regressions ❌
(secondary)
1.9% [1.0%, 3.7%] 5
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.9% [-2.9%, -2.9%] 1
All ❌✅ (primary) 4.1% [4.1%, 4.1%] 1

Cycles

Results (primary -0.5%, secondary 2.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.8% [2.8%, 2.8%] 1
Regressions ❌
(secondary)
4.2% [3.1%, 5.3%] 2
Improvements ✅
(primary)
-2.1% [-2.2%, -2.1%] 2
Improvements ✅
(secondary)
-2.5% [-2.5%, -2.5%] 1
All ❌✅ (primary) -0.5% [-2.2%, 2.8%] 3

Binary size

Results (secondary -0.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.0% [-0.0%, -0.0%] 1
All ❌✅ (primary) - - 0

@panstromek

panstromek commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Weird, let's benchmark the rest, I guess

@rust-timer triage 8a6ec0c ff19789

@rust-timer

rust-timer commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

#161718 8a6ec0c Fix the wasm32-unknown-unknown target feature/cfg bug

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
0.2% [0.2%, 0.2%] 3
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.2% [0.2%, 0.2%] 3

Max RSS (memory usage)

Results (primary 0.5%, secondary -1.9%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
0.5% [0.5%, 0.5%] 1
Regressions ❌
(secondary)
3.0% [1.8%, 3.6%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.7% [-7.8%, -3.3%] 7
All ❌✅ (primary) 0.5% [0.5%, 0.5%] 1

Cycles

Results (secondary -0.9%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.0% [2.0%, 2.0%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.4% [-2.7%, -2.1%] 2
All ❌✅ (primary) - - 0

Binary size

Results (secondary -0.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.0% [-0.0%, -0.0%] 1
All ❌✅ (primary) - - 0

#161796 ff19789 Remove dead parse error recovery (underscores in expressions)

Instruction count

This perf run didn't have relevant results for this metric.

Max RSS (memory usage)

Results (secondary -1.4%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.7% [2.0%, 5.5%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.7% [-5.6%, -3.2%] 3
All ❌✅ (primary) - - 0

Cycles

Results (primary -2.0%, secondary 1.8%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.5% [2.3%, 5.6%] 3
Improvements ✅
(primary)
-2.0% [-2.0%, -2.0%] 1
Improvements ✅
(secondary)
-3.1% [-3.1%, -3.1%] 1
All ❌✅ (primary) -2.0% [-2.0%, -2.0%] 1

Binary size

This perf run didn't have relevant results for this metric.

@panstromek

Copy link
Copy Markdown
Contributor

nice, definitely wouldn't guess this one. I'll continue the discussion on the PR.

@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-run-make Area: port run-make Makefiles to rmake.rs merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. rollup A PR which is a rollup T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants