Skip to content

Rollup of 10 pull requests #142392

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 25 commits into from
Jun 12, 2025
Merged

Rollup of 10 pull requests #142392

merged 25 commits into from
Jun 12, 2025

Conversation

matthiaskrgr
Copy link
Member

@matthiaskrgr matthiaskrgr commented Jun 12, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

b-naber and others added 25 commits June 2, 2025 16:25
…` wording

In some contexts, const expressions are OK. Add a `here` to the error
message to clarify this.
Previously, `rustc_transmute`'s layout representations were genericized
over `R`, a reference. Now, it's instead genericized over
representations of type and region. This allows us to move reference
transmutability logic from `rustc_trait_selection` to
`rustc_transmutability` (and thus unit test it independently of the
compiler), and — in a follow-up PR — will make it possible to support
analyzing function pointer transmutability with minimal surgery.
If an attribute is re-emitted by a macro, the incorrect edition was used to emit warnings for unsafe attributes
Host is the machine where bootstrap runs, and this field represents the target of the (host) stage0/beta compiler. This is much clearer than `build`, which also conflicts with the `Build` struct, which is stored under the name `build` inside `Builder` (lol).
Add method to retrieve body of closure in stable-mir

fixes rust-lang/project-stable-mir#85

r? `@celinval`
…c, r=compiler-errors

transmutability: shift abstraction boundary

Previously, `rustc_transmute`'s layout representations were genericized over `R`, a reference. Now, it's instead genericized over representations of type and region. This allows us to move reference transmutability logic from `rustc_trait_selection` to `rustc_transmutability` (and thus unit test it independently of the compiler), and — in a follow-up PR — will make it possible to support analyzing function pointer transmutability with minimal surgery.

r? `@compiler-errors`
…=compiler-errors

More simple 2015 edition test decoupling

This should be the last of these PRs for now. The remaining tests that do not work on other editions than 2015 either need the range support (so blocked on the MCP), need normalization rules (which needs discussions first/same MCP) or revisions.

r? compiler-errors
…es, r=compiler-errors

rustc_resolve: Improve `resolve_const_param_in_non_trivial_anon_const` wording

In some contexts, const expressions are OK. Add a `here` to the error message to clarify this.

Closes rust-lang#79429 which has 15 x 👍
`tests/ui`: A New Order [10/N]

Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang#133895.

r? `@jieyouxu`
`tests/ui`: A New Order [11/N]

Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang#133895.

r? `@jieyouxu`
…dition, r=compiler-errors

use correct edition when warning for unsafe attributes

fixes rust-lang#142182

If an attribute is re-emitted by a macro, the incorrect edition was used to emit warnings for unsafe attributes.

This logic was introduced in rust-lang#139718

cc `@compiler-errors` `@ehuss`
…ouxu

Assorted bootstrap cleanups (step 1)

Now that the stage0 redesign has landed, we can finally start cleaning up many things in bootstrap, and lord knows it deserves it! I plan to send many PRs once I figure out an incremental way forward, this is the first one of them. It doesn't actually change anything, just renames stuff and adds more documentation, but the rename is bitrotty, so I wanted to push the PR eagerly.

r? `@jieyouxu`
…eyouxu

Cleanup `rust-src` remapping and real dir

When remapping, `bootstrap` sets `CFG_VIRTUAL_RUST_SOURCE_BASE_DIR` to indicate what the base build dir (`/` of this repo) was remapped to, ie. `/rustc/...`.

It is therefore impossible when stripping `/rustc/...` from a remapped path to be inside the our `library/` directory, nevertheless we have code that assumed it was possible and helpfully tried to correct it. I don't why this was done, but it's not necessary.

~~The normalization in compiletest of `$SRC_DIR_REAL` was also slightly wrong, it ate the `library` part for no reason.~~ EDIT: there is a reason, it affects too much tests otherwise

r? `@jieyouxu`
…nteger, r=wesleywiser

compiler: Make `c_int_width` an integer

Because it is.

That's all I got.
@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Jun 12, 2025
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Jun 12, 2025

📌 Commit 2407761 has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors 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 Jun 12, 2025
@bors
Copy link
Collaborator

bors commented Jun 12, 2025

⌛ Testing commit 2407761 with merge fe5c95d...

@bors
Copy link
Collaborator

bors commented Jun 12, 2025

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing fe5c95d to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jun 12, 2025
@bors bors merged commit fe5c95d into rust-lang:master Jun 12, 2025
11 checks passed
@rustbot rustbot added this to the 1.89.0 milestone Jun 12, 2025
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#141307 Add method to retrieve body of closure in stable-mir 18907ce4ab854ccd3c335b3a3adf7ad3430bc16e (link)
#142040 transmutability: shift abstraction boundary 09818c962074ca6a68cb4d3b08babf87426e8c7f (link)
#142066 More simple 2015 edition test decoupling 509ad3c8f512514615e8ffb86f96eafadd684706 (link)
#142157 rustc_resolve: Improve `resolve_const_param_in_non_trivial_… 099511f96b70603806e65d6cac4f1cf5b0748961 (link)
#142217 tests/ui: A New Order [10/N] f089ad3b6e1cd0f315aced65ece95d848def7ca9 (link)
#142219 tests/ui: A New Order [11/N] aea449e10058a98b4e230b85f85a3c64df509fc0 (link)
#142261 use correct edition when warning for unsafe attributes 837d40ee73699f8047d5d70a7b10af12a7d43281 (link)
#142303 Assorted bootstrap cleanups (step 1) 216d3a1713d36f495ecb11298ef4ab36962012c0 (link)
#142318 Cleanup rust-src remapping and real dir e980d5236b4b1e8173bc83341fe4febb65dbde5e (link)
#142352 compiler: Make c_int_width an integer 875c6ea1087f22854e8de6ef74fd439aa36e66c6 (link)

previous master: 14346303d7

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

Copy link
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 1434630 (parent) -> fe5c95d (this PR)

Test differences

Show 88 test diffs

Stage 1

  • [ui] tests/ui-fulldeps/stable-mir/closure-generic-body.rs: [missing] -> ignore (ignored when the bootstrapping stage is stage1) (J1)
  • [ui] tests/ui-fulldeps/stable-mir/closure_body.rs: [missing] -> ignore (ignored when the bootstrapping stage is stage1) (J1)
  • [ui] tests/ui/box/empty-alloc-deref-rvalue.rs: [missing] -> pass (J1)
  • [ui] tests/ui/cfg/cfg-false-use-item.rs: [missing] -> pass (J1)
  • [ui] tests/ui/const-generics/generic_const_exprs/trivial-anon-const-use-cases.rs#full: [missing] -> pass (J1)
  • [ui] tests/ui/const-generics/generic_const_exprs/trivial-anon-const-use-cases.rs#min: [missing] -> pass (J1)
  • [ui] tests/ui/derives/copy-drop-mutually-exclusive.rs: [missing] -> pass (J1)
  • [ui] tests/ui/drop/explicit-drop-call-error.rs: [missing] -> pass (J1)
  • [ui] tests/ui/editions/unsafe-attr-edition-span.rs#e2015: [missing] -> pass (J1)
  • [ui] tests/ui/editions/unsafe-attr-edition-span.rs#e2018: [missing] -> pass (J1)
  • [ui] tests/ui/editions/unsafe-attr-edition-span.rs#e2021: [missing] -> pass (J1)
  • [ui] tests/ui/editions/unsafe-attr-edition-span.rs#e2024: [missing] -> pass (J1)
  • [ui] tests/ui/empty-allocation-rvalue-non-null.rs: pass -> [missing] (J1)
  • [ui] tests/ui/empty-type-parameter-list.rs: pass -> [missing] (J1)
  • [ui] tests/ui/error-should-say-copy-not-pod.rs: pass -> [missing] (J1)
  • [ui] tests/ui/exclusive-drop-and-copy.rs: pass -> [missing] (J1)
  • [ui] tests/ui/explicit-i-suffix.rs: pass -> [missing] (J1)
  • [ui] tests/ui/explore-issue-38412.rs: pass -> [missing] (J1)
  • [ui] tests/ui/ext-expand-inner-exprs.rs: pass -> [missing] (J1)
  • [ui] tests/ui/ext-nonexistent.rs: pass -> [missing] (J1)
  • [ui] tests/ui/fact.rs: pass -> [missing] (J1)
  • [ui] tests/ui/filter-block-view-items.rs: pass -> [missing] (J1)
  • [ui] tests/ui/fmt/format-macro-no-std.rs: [missing] -> pass (J1)
  • [ui] tests/ui/format-no-std.rs: pass -> [missing] (J1)
  • [ui] tests/ui/fun-indirect-call.rs: pass -> [missing] (J1)
  • [ui] tests/ui/future-incompatible-lint-group.rs: pass -> [missing] (J1)
  • [ui] tests/ui/generics/empty-generic-brackets-equiv.rs: [missing] -> pass (J1)
  • [ui] tests/ui/global-scope.rs: pass -> [missing] (J1)
  • [ui] tests/ui/hello.rs#e2015: pass -> [missing] (J1)
  • [ui] tests/ui/hello.rs#e2018: pass -> [missing] (J1)
  • [ui] tests/ui/hello.rs#e2021: pass -> [missing] (J1)
  • [ui] tests/ui/hello.rs#e2024: pass -> [missing] (J1)
  • [ui] tests/ui/illegal-ufcs-drop.rs: pass -> [missing] (J1)
  • [ui] tests/ui/impl-inherent-non-conflict.rs: pass -> [missing] (J1)
  • [ui] tests/ui/impl-not-adjacent-to-type.rs: pass -> [missing] (J1)
  • [ui] tests/ui/lint/future-incompatible-lint-group.rs: [missing] -> pass (J1)
  • [ui] tests/ui/macros/nested-macro-expansion.rs: [missing] -> pass (J1)
  • [ui] tests/ui/methods/inherent-methods-same-name.rs: [missing] -> pass (J1)
  • [ui] tests/ui/modules/impl-cross-module.rs: [missing] -> pass (J1)
  • [ui] tests/ui/resolve/global-scope-resolution.rs: [missing] -> pass (J1)
  • [ui] tests/ui/resolve/nonexistent-macro.rs: [missing] -> pass (J1)
  • [ui] tests/ui/stability-attribute/stability-privacy-interaction.rs: [missing] -> pass (J1)

Stage 2

  • [ui] tests/ui/box/empty-alloc-deref-rvalue.rs: [missing] -> pass (J0)
  • [ui] tests/ui/cfg/cfg-false-use-item.rs: [missing] -> pass (J0)
  • [ui] tests/ui/const-generics/generic_const_exprs/trivial-anon-const-use-cases.rs#full: [missing] -> pass (J0)
  • [ui] tests/ui/const-generics/generic_const_exprs/trivial-anon-const-use-cases.rs#min: [missing] -> pass (J0)
  • [ui] tests/ui/derives/copy-drop-mutually-exclusive.rs: [missing] -> pass (J0)
  • [ui] tests/ui/drop/explicit-drop-call-error.rs: [missing] -> pass (J0)
  • [ui] tests/ui/editions/unsafe-attr-edition-span.rs#e2015: [missing] -> pass (J0)
  • [ui] tests/ui/editions/unsafe-attr-edition-span.rs#e2018: [missing] -> pass (J0)
  • [ui] tests/ui/editions/unsafe-attr-edition-span.rs#e2021: [missing] -> pass (J0)
  • [ui] tests/ui/editions/unsafe-attr-edition-span.rs#e2024: [missing] -> pass (J0)
  • [ui] tests/ui/empty-allocation-rvalue-non-null.rs: pass -> [missing] (J0)
  • [ui] tests/ui/empty-type-parameter-list.rs: pass -> [missing] (J0)
  • [ui] tests/ui/error-should-say-copy-not-pod.rs: pass -> [missing] (J0)
  • [ui] tests/ui/exclusive-drop-and-copy.rs: pass -> [missing] (J0)
  • [ui] tests/ui/explicit-i-suffix.rs: pass -> [missing] (J0)
  • [ui] tests/ui/explore-issue-38412.rs: pass -> [missing] (J0)
  • [ui] tests/ui/ext-expand-inner-exprs.rs: pass -> [missing] (J0)
  • [ui] tests/ui/ext-nonexistent.rs: pass -> [missing] (J0)
  • [ui] tests/ui/fact.rs: pass -> [missing] (J0)
  • [ui] tests/ui/filter-block-view-items.rs: pass -> [missing] (J0)
  • [ui] tests/ui/fmt/format-macro-no-std.rs: [missing] -> pass (J0)
  • [ui] tests/ui/format-no-std.rs: pass -> [missing] (J0)
  • [ui] tests/ui/fun-indirect-call.rs: pass -> [missing] (J0)
  • [ui] tests/ui/future-incompatible-lint-group.rs: pass -> [missing] (J0)
  • [ui] tests/ui/generics/empty-generic-brackets-equiv.rs: [missing] -> pass (J0)
  • [ui] tests/ui/global-scope.rs: pass -> [missing] (J0)
  • [ui] tests/ui/hello.rs#e2015: pass -> [missing] (J0)
  • [ui] tests/ui/hello.rs#e2018: pass -> [missing] (J0)
  • [ui] tests/ui/hello.rs#e2021: pass -> [missing] (J0)
  • [ui] tests/ui/hello.rs#e2024: pass -> [missing] (J0)
  • [ui] tests/ui/illegal-ufcs-drop.rs: pass -> [missing] (J0)
  • [ui] tests/ui/impl-inherent-non-conflict.rs: pass -> [missing] (J0)
  • [ui] tests/ui/impl-not-adjacent-to-type.rs: pass -> [missing] (J0)
  • [ui] tests/ui/lint/future-incompatible-lint-group.rs: [missing] -> pass (J0)
  • [ui] tests/ui/macros/nested-macro-expansion.rs: [missing] -> pass (J0)
  • [ui] tests/ui/methods/inherent-methods-same-name.rs: [missing] -> pass (J0)
  • [ui] tests/ui/modules/impl-cross-module.rs: [missing] -> pass (J0)
  • [ui] tests/ui/resolve/global-scope-resolution.rs: [missing] -> pass (J0)
  • [ui] tests/ui/resolve/nonexistent-macro.rs: [missing] -> pass (J0)
  • [ui] tests/ui/stability-attribute/stability-privacy-interaction.rs: [missing] -> pass (J0)
  • [ui] tests/ui-fulldeps/stable-mir/closure-generic-body.rs: [missing] -> pass (J2)
  • [ui] tests/ui-fulldeps/stable-mir/closure_body.rs: [missing] -> pass (J2)

Additionally, 4 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 fe5c95d4ae33ec9d7831921e448e2daf8264ea42 --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-apple-1: 9403.1s -> 6760.9s (-28.1%)
  2. dist-x86_64-apple: 10174.7s -> 8009.3s (-21.3%)
  3. dist-apple-various: 7048.6s -> 5879.1s (-16.6%)
  4. x86_64-apple-2: 5708.5s -> 5008.5s (-12.3%)
  5. mingw-check-tidy: 69.8s -> 77.7s (11.2%)
  6. aarch64-apple: 5214.8s -> 4706.1s (-9.8%)
  7. test-various: 4378.7s -> 4764.2s (8.8%)
  8. x86_64-msvc-ext1: 6681.7s -> 7175.5s (7.4%)
  9. dist-aarch64-apple: 6299.7s -> 5866.9s (-6.9%)
  10. dist-various-1: 4119.2s -> 4339.3s (5.3%)
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
Collaborator

Finished benchmarking commit (fe5c95d): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

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
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.8% [-4.9%, -0.1%] 37
Improvements ✅
(secondary)
-1.4% [-7.7%, -0.2%] 72
All ❌✅ (primary) -0.8% [-4.9%, -0.1%] 37

Max RSS (memory usage)

Results (primary -1.9%, secondary -2.4%)

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

mean range count
Regressions ❌
(primary)
0.8% [0.8%, 0.8%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-3.2% [-3.5%, -2.9%] 2
Improvements ✅
(secondary)
-2.4% [-5.8%, -1.1%] 11
All ❌✅ (primary) -1.9% [-3.5%, 0.8%] 3

Cycles

Results (secondary -0.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)
2.1% [2.1%, 2.1%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.3% [-2.5%, -2.1%] 2
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 755.927s -> 754.482s (-0.19%)
Artifact size: 372.13 MiB -> 372.10 MiB (-0.01%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.