Skip to content

Rollup of 6 pull requests #141545

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 14 commits into from
May 25, 2025
Merged

Rollup of 6 pull requests #141545

merged 14 commits into from
May 25, 2025

Conversation

GuillaumeGomez
Copy link
Member

@GuillaumeGomez GuillaumeGomez commented May 25, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

RalfJung and others added 14 commits May 23, 2025 15:03
Method errors have an extra check that force trim paths whenever the
normal string is longer than 10 characters, which can be quite unhelpful
when multiple items have the same name (for example an `Error`).

A user reported this force trimming as being quite unhelpful when they
had a method error where the precise path of the `Error` mattered.

The code uses `tcx.short_string` already to get the normal path, which
tries to be clever around trimming paths if necessary, so there is no
reason for this extra force trimming.
This addresses issue 104200 by setting the TESTNAME environment
variable automatically based on the paths from run configs,
marking a selected set of UI tests to be run.

Note that this does not filter out other unit tests using #[test].
Co-authored-by: Jubilee <[email protected]>
Make #[cfg(version)] respect RUSTC_OVERRIDE_VERSION_STRING

The `#[cfg(version(...))]` feature is currently under-tested. Part of it is the difficulty that it is hard to write a test that never changes, while the version of the Rust compiler indeed *does* change.

PR rust-lang#81468 added the first and so far only test of `#[cfg(version(...))]`'s functionality (there is one other test for the *syntax*, that also acts as feature gate). But that test uses a proc macro that parses the version: the text of the test doesn't contain the actual `#[cfg(version(...))]`.

This PR makes `#[cfg(version(...))]` respect `RUSTC_OVERRIDE_VERSION_STRING`, added by PR rust-lang#124339, allowing us to virtually pin the rustc version and write tests from all directions against some specific version.

The PR also adds a functional test of `#[cfg(version(...))]` that leverages `RUSTC_OVERRIDE_VERSION_STRING`.

Pulled out of rust-lang#141137.

Tracking issue: rust-lang#64796
…workingjubilee

make teach_help message for cast-before-pass-to-variadic more precise

r? `@workingjubilee`
based on your comment [here](rust-lang#44930 (comment))
…zkan

bootstrap: clippy: set TESTNAME based on given paths

This addresses rust-lang#104200 by setting the TESTNAME environment variable automatically based on the paths from run configs, marking a selected set of UI tests to be run.

Note that this does not filter out other unit tests using #[test].
… r=compiler-errors

Avoid extra path trimming in method not found error

Method errors have an extra check that force trim paths whenever the normal string is longer than 10 characters, which can be quite unhelpful when multiple items have the same name (for example an `Error`).

A user reported this force trimming as being quite unhelpful when they had a method error where the precise path of the `Error` mattered.

The code uses `tcx.short_string` already to get the normal path, which tries to be clever around trimming paths if necessary, so there is no reason for this extra force trimming.
…omments, r=Urgau

Added unstable feature doc comments to unstable book

This PR adds doc comments for unstables features in [compiler/rustc_feature/src/unstable.rs](https://github.com/rust-lang/rust/blob/d3a2440384b54664dddd56e0081ca094c444e869/compiler/rustc_feature/src/unstable.rs#L190-L191) to the unstable book feature pages.

Fixes rust-lang#141528

Example features rendered

![image](https://github.com/user-attachments/assets/2b65f534-26f8-441f-ba29-65554c9154b7)

![image](https://github.com/user-attachments/assets/6077491b-ddaf-447e-9519-0bc110c7a893)

r? `@jyn514`
Random nits

Two completely random commits that I didn't know where to integrate into another PR.

* Don't use the full type relation machinery to equate two regions (it's overkill).
* Add a comment that `select_in_new_trait_solver` shouldn't be used directly.

r? lcnr or reassign
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) rollup A PR which is a rollup labels May 25, 2025
@GuillaumeGomez
Copy link
Member Author

@bors r+ p=5 rollup=never

@bors
Copy link
Collaborator

bors commented May 25, 2025

📌 Commit 43cb506 has been approved by GuillaumeGomez

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 May 25, 2025
@bors
Copy link
Collaborator

bors commented May 25, 2025

⌛ Testing commit 43cb506 with merge 283db70...

@bors
Copy link
Collaborator

bors commented May 25, 2025

☀️ Test successful - checks-actions
Approved by: GuillaumeGomez
Pushing 283db70 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 25, 2025
@bors bors merged commit 283db70 into rust-lang:master May 25, 2025
1 check passed
@rustbot rustbot added this to the 1.89.0 milestone May 25, 2025
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#141413 Make #[cfg(version)] respect RUSTC_OVERRIDE_VERSION_STRING 448653b719ae72ff03c562a73ebeebb7d2ed3702 (link)
#141443 make teach_help message for cast-before-pass-to-variadic mo… 693eaef48100a3b0459f7f48313f04bfb625aeea (link)
#141508 bootstrap: clippy: set TESTNAME based on given paths 8e823626a891b48ad3cf64eebc3a8b6d9568e250 (link)
#141512 Avoid extra path trimming in method not found error 9c75faff25dc3d750ee9968830757d1e6ca4b802 (link)
#141530 Added unstable feature doc comments to unstable book e498d664c3cbbf0bddcb56dd12d4882ea68c157e (link)
#141541 Random nits cbc363a78c73ec934e575b4c496c03e69c4c5cc0 (link)

previous master: 88b3b520e8

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

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 88b3b52 (parent) -> 283db70 (this PR)

Test differences

Show 4 test diffs

Stage 1

  • [ui] tests/ui/cfg/cfg-version/cfg-version-expand.rs: [missing] -> pass (J1)
  • [ui] tests/ui/methods/untrimmed-path-type.rs: [missing] -> pass (J1)

Stage 2

  • [ui] tests/ui/cfg/cfg-version/cfg-version-expand.rs: [missing] -> pass (J0)
  • [ui] tests/ui/methods/untrimmed-path-type.rs: [missing] -> pass (J0)

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 283db70ace62a0ae704a624e43b68c2ee44b87a6 --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-apple-various: 6694.8s -> 5980.3s (-10.7%)
  2. x86_64-apple-1: 6870.0s -> 6342.2s (-7.7%)
  3. dist-loongarch64-musl: 5275.8s -> 5617.9s (6.5%)
  4. mingw-check: 1267.4s -> 1193.3s (-5.8%)
  5. dist-ohos-aarch64: 4711.5s -> 4446.0s (-5.6%)
  6. x86_64-msvc-ext3: 7590.0s -> 7957.2s (4.8%)
  7. dist-x86_64-netbsd: 4903.6s -> 5108.6s (4.2%)
  8. dist-ohos-armv7: 4234.4s -> 4398.7s (3.9%)
  9. x86_64-msvc-ext1: 7137.1s -> 6871.2s (-3.7%)
  10. dist-ohos-x86_64: 4594.1s -> 4437.0s (-3.4%)
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 (283db70): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

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

Max RSS (memory usage)

Results (primary -4.0%, secondary -0.9%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
3.9% [3.9%, 3.9%] 1
Regressions ❌
(secondary)
2.2% [2.2%, 2.2%] 1
Improvements ✅
(primary)
-6.6% [-10.1%, -1.5%] 3
Improvements ✅
(secondary)
-2.4% [-2.6%, -2.3%] 2
All ❌✅ (primary) -4.0% [-10.1%, 3.9%] 4

Cycles

Results (primary -3.0%, secondary 2.0%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

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

Binary size

Results (primary -1.1%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

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

Bootstrap: 775.765s -> 775.708s (-0.01%)
Artifact size: 366.27 MiB -> 366.25 MiB (-0.01%)

@GuillaumeGomez GuillaumeGomez deleted the rollup-myrvuqq branch May 26, 2025 08:40
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 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. 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants