Skip to content

Rollup of 6 pull requests #144673

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 12 commits into from
Jul 30, 2025
Merged

Rollup of 6 pull requests #144673

merged 12 commits into from
Jul 30, 2025

Conversation

Zalathar
Copy link
Contributor

@Zalathar Zalathar commented Jul 30, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

xizheyin and others added 12 commits July 29, 2025 14:54
This list no longer needs to be included in multiple crates, but having it in
its own file makes it easier to find and update when necessary.
Add some constraints to run-make tests that require specific target support and will fail without them.
Verify llvm-needs-components are not empty and match the --target value

I recently discovered a test with an empty `llvm-needs-components` entry (fixed in rust-lang#143979) which meant that it didn't work correctly when building Rust with a limited set of LLVM targets.

This change makes a pair of improvements to prevent this issue from creeping in again:
* When parsing directives with values, `compiletest` will now raise an error if there is an empty value.
* Improved the `target_specific_tests` tidy checker to map targets to LLVM components, to verify that any existing `llvm-needs-components` contains the target being used.

I also fixed all the issues flagged by the improved tidy checker.
…ieyouxu

Add method `find_ancestor_not_from_macro` and `find_ancestor_not_from_extern_macro` to supersede `find_oldest_ancestor_in_same_ctxt`

As I was using it, I realized that the function is supposed to walk up to expand the chain? This seems to be the opposite of what I understood.

r? `@jieyouxu`
Remove `hello_world` directory

Move `tests/ui/hello_world/main.rs` and retire the single-file `tests/ui/hello_world/` directory.

Part of rust-lang#133895.

r? `@jieyouxu`
compiletest: Move directive names back into a separate file

This list no longer needs to be included in multiple crates, but having the list in its own file makes it easier to find and update when necessary.

As discussed at rust-lang#143850 (comment).
Make sure to account for the right item universal regions in borrowck

Fixes rust-lang#144608.

The ICE comes from a mismatch between the liberated late bound regions (i.e. "`ReLateParam`"s) that come from promoting closure outlives, and the regions we have in our region vid mapping from `UniversalRegions`.

When building `UniversalRegions`, we end up using the liberated regions from the binder of the closure's signature:

https://github.com/rust-lang/rust/blob/c8bb4e8a126cf38cff70cea488a3a423a5321954/compiler/rustc_borrowck/src/universal_regions.rs#L521

Notably, this signature may be anonymized if the closure signature being deduced comes from an external constraints:

https://github.com/rust-lang/rust/blob/c8bb4e8a126cf38cff70cea488a3a423a5321954/compiler/rustc_hir_typeck/src/closure.rs#L759-L762

This is true in the test file I committed, where the signature is influenced by the `impl FnMut(&mut ())` RPIT.

However, when promoting a type outlives constraint we end up creating a late bound lifetime mapping that disagrees with those liberated late bound regions we constructed in `UniversalRegions`:

https://github.com/rust-lang/rust/blob/c8bb4e8a126cf38cff70cea488a3a423a5321954/compiler/rustc_borrowck/src/universal_regions.rs#L299

Specifically, in `for_each_late_bound_region_in_item` (which is called by `for_each_late_bound_region_in_recursive_scope`), we were using `tcx.late_bound_vars` which uses the late bound regions *from the HIR*. This query both undercounts the late bound regions (e.g. those that end up being deduced from bounds), and also doesn't account for the fact that we anonymize them in the signature as mentioned above.

https://github.com/rust-lang/rust/blob/c8bb4e8a126cf38cff70cea488a3a423a5321954/compiler/rustc_borrowck/src/universal_regions.rs#L977

This PR fixes that function to use the *correct signature*, which properly considers the bound vars that come from deducing the signature of the closure, and which comes from the closure's args from the `type_of` query.
…ponents, r=jieyouxu

[test][run-make] add needs-llvm-components

Add some constraints to run-make tests that require specific target support and will fail without them.
@rustbot rustbot added A-compiletest Area: The compiletest test runner A-run-make Area: port run-make Makefiles to rmake.rs A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool PG-exploit-mitigations Project group: Exploit mitigations 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. labels Jul 30, 2025
@Zalathar
Copy link
Contributor Author

@bors r+ rollup=never p=5

@rustbot rustbot added the rollup A PR which is a rollup label Jul 30, 2025
@bors
Copy link
Collaborator

bors commented Jul 30, 2025

📌 Commit 3682d8c has been approved by Zalathar

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 Jul 30, 2025
@bors
Copy link
Collaborator

bors commented Jul 30, 2025

⌛ Testing commit 3682d8c with merge e5e79f8...

@bors
Copy link
Collaborator

bors commented Jul 30, 2025

☀️ Test successful - checks-actions
Approved by: Zalathar
Pushing e5e79f8 to master...

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

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#144042 Verify llvm-needs-components are not empty and match the --… 902c292cc8709962f5852bae853ceb7e9f7edc8f (link)
#144268 Add method find_ancestor_not_from_macro and `find_ancesto… 4ecb18932abafea1321e3801039daba598395ab8 (link)
#144411 Remove hello_world directory 25b0fb861dc05b9740b0a00f8550aef7bd19232c (link)
#144662 compiletest: Move directive names back into a separate file 68fe9dc15551c5688dbc149805fb1a10e59839f4 (link)
#144666 Make sure to account for the right item universal regions i… 33a0706fd74f5b11a3b5a56338ed9066db882aac (link)
#144668 [test][run-make] add needs-llvm-components 373447262b10e452c47bef56cfad1dd53aad0f3a (link)

previous master: 72716b134a

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 72716b1 (parent) -> e5e79f8 (this PR)

Test differences

Show 16 test diffs

Stage 1

  • [ui] tests/ui/borrowck/liberated-region-from-outer-closure.rs: [missing] -> pass (J0)
  • [ui] tests/ui/hello_world/main.rs: pass -> [missing] (J0)
  • [ui] tests/ui/warnings/hello-world.rs: [missing] -> pass (J0)

Stage 2

  • [ui] tests/ui/borrowck/liberated-region-from-outer-closure.rs: [missing] -> pass (J1)
  • [ui] tests/ui/hello_world/main.rs: pass -> [missing] (J1)
  • [ui] tests/ui/warnings/hello-world.rs: [missing] -> pass (J1)

Additionally, 10 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 e5e79f8bd428d0b8d26e8240d718b134ef297459 --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. dist-aarch64-linux: 8129.1s -> 5816.0s (-28.5%)
  2. pr-check-2: 2102.2s -> 2685.3s (27.7%)
  3. dist-sparcv9-solaris: 4950.7s -> 5917.4s (19.5%)
  4. x86_64-apple-2: 6491.4s -> 5545.0s (-14.6%)
  5. pr-check-1: 1530.3s -> 1752.4s (14.5%)
  6. i686-gnu-nopt-1: 7142.1s -> 8168.4s (14.4%)
  7. x86_64-apple-1: 6852.8s -> 7818.8s (14.1%)
  8. i686-gnu-2: 5538.8s -> 6139.7s (10.8%)
  9. x86_64-rust-for-linux: 2591.6s -> 2850.2s (10.0%)
  10. aarch64-apple: 5370.8s -> 5897.0s (9.8%)
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 (e5e79f8): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

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

Max RSS (memory usage)

Results (primary -1.0%, secondary 3.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)
3.2% [3.2%, 3.2%] 1
Improvements ✅
(primary)
-1.0% [-1.0%, -1.0%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -1.0% [-1.0%, -1.0%] 1

Cycles

Results (secondary -16.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
Improvements ✅
(secondary)
-16.1% [-16.9%, -15.3%] 6
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 468.451s -> 469.342s (0.19%)
Artifact size: 376.81 MiB -> 376.86 MiB (0.01%)

@Zalathar Zalathar deleted the rollup-0kpeq3n branch July 31, 2025 05:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-compiletest Area: The compiletest test runner A-run-make Area: port run-make Makefiles to rmake.rs A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool merged-by-bors This PR was explicitly merged by bors. PG-exploit-mitigations Project group: Exploit mitigations 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.

9 participants