Skip to content

Conversation

@matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost

Create a similar rollup

Shunpoco and others added 14 commits January 29, 2026 08:11
Current tidy parses paths and options manually, and parsing is spreading multple files. This commit introduces a parser using clap to clean and centralize it.
Currently some required arguments (like path of the root dir) are ordered, but it causes an user (mainly bootstrap) needs to remember the order. This commit introduces long arguments (e.g., --root-path) for required args.
Also returns the `Region` of the reference type.
Introducing clap on tidy

### Context
Currently tidy parses paths/flags from args_os manually, and the extraction is spreading multiple files. It may be a breeding ground for bugs.

ref: https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/How.20--ci.3Dtrue.20interact.20with.20CiEnv.3F/near/543171560
(N.B. We've talked about introducing a ci flag in tidy in that thread, but I don't do it in this PR as I don't want to put multiple changes into a PR. I will introduce the flag in a coming PR.)

### Changes
This PR replaces current parsing logic with clap. To confirm the new parser works fine, I introduce an unit test for it.

### Build time
We've concerned about how clap increases the build time. In order to confirm the increment is acceptable, I did an experiment on CI:
- Run cargo build without cache for tidy 50 times in each environment on CI
- Calculate an average and a standard deviation from the result, and plot them

Here is the graph:
<img width="943" height="530" alt="rust_tidy_build_time" src="https://github.com/user-attachments/assets/c7deee69-9f38-4044-87dc-76d6e7384f76" />

- Clap tends to increase build time ~2s. We think this is not a big problem
- Build time differs in each environment
- In some cases standard deviation are high, I suppose that busyness of CI instances affect build time
…=lqd

Revert enabling `outline-atomics` on various platforms

Our implementations in `compiler-builtins` do not yet have BTI landing pads, so platforms using a custom-built std with unstable `-Zbranch-protection=bti` may run into issues. This should resolve rust-lang#151486. There is a PR in progress to add BTI support to compiler-builtins [1], after which this can be re-enabled.

Linux has had `outline-atomics` enabled for years [2] with no known problems, so it is not changed here.

Partially reverts rust-lang#144938
Reverts rust-lang#149633
Zulip discussion: https://rust-lang.zulipchat.com/#narrow/channel/245100-t-compiler.2Fprioritization.2Falerts/topic/.23151486.20Chromium.20hitting.20SIGILL.20crashes.20on.20aarch64.20after.20.231.E2.80.A6/with/571170956

[1]: rust-lang/compiler-builtins#1063
[2]: tgross35@0f9f241
…r=jackh726

refactor: remove `Ty::pinned_ref` in favor of `Ty::maybe_pinned_ref`

Also returns the `Region` of the reference type in `Ty::maybe_pinned_Ref`.

Part of rust-lang#149130.

r? jackh726
…ooeo

Document enum types used as values for E0423

### Problem

The E0423 error explanation did not include an example for enum types being used
as values, which is a common source of confusion for users.

For example, the following code:

```rust
fn main() {
    let x = Option::<i32>;
}
```
@rust-bors rust-bors bot added the rollup A PR which is a rollup label Jan 31, 2026
@rustbot rustbot added 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. labels Jan 31, 2026
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 31, 2026

📌 Commit 72f163c has been approved by matthiaskrgr

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 Jan 31, 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 Jan 31, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 31, 2026

☀️ Test successful - CI
Approved by: matthiaskrgr
Duration: 3h 24m 7s
Pushing 78865ca to main...

@rust-bors rust-bors bot merged commit 78865ca into rust-lang:main Jan 31, 2026
12 checks passed
@rustbot rustbot added this to the 1.95.0 milestone Jan 31, 2026
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#151262 Introducing clap on tidy fa24d8be9fdf2d454419643ab3dbfd8dacc5ef40 (link)
#151849 refactor: remove Ty::pinned_ref in favor of `Ty::maybe_pi… c267f51b956aaca68e8d66940dd58f001013bbf8 (link)
#151892 Document enum types used as values for E0423 34423c606494cd38b19f159e0b63c49f7e4b0944 (link)
#151896 Revert enabling outline-atomics on various platforms 7a785b5a9a46a53b9039d81f9259d1d4f55bc403 (link)

previous master: 271951ba18

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

@github-actions
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 271951b (parent) -> 78865ca (this PR)

Test differences

Show 17 test diffs

Stage 0

  • arg_parser::tests::test_tidy_parser_any_order: [missing] -> pass (J0)
  • arg_parser::tests::test_tidy_parser_full: [missing] -> pass (J0)
  • arg_parser::tests::test_tidy_parser_missing_cargo_path: [missing] -> pass (J0)
  • arg_parser::tests::test_tidy_parser_missing_concurrency: [missing] -> pass (J0)
  • arg_parser::tests::test_tidy_parser_missing_npm_path: [missing] -> pass (J0)
  • arg_parser::tests::test_tidy_parser_missing_output_dir: [missing] -> pass (J0)
  • arg_parser::tests::test_tidy_parser_missing_root_path: [missing] -> pass (J0)

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 78865ca937ef3b77b214473db78b51ec82e2277a --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. aarch64-apple: 8940.3s -> 11880.3s (+32.9%)
  2. dist-aarch64-llvm-mingw: 5682.9s -> 6944.8s (+22.2%)
  3. dist-apple-various: 3524.4s -> 4279.8s (+21.4%)
  4. i686-gnu-nopt-1: 7500.8s -> 8436.8s (+12.5%)
  5. dist-x86_64-apple: 5921.8s -> 6506.6s (+9.9%)
  6. i686-msvc-2: 7270.8s -> 7947.4s (+9.3%)
  7. dist-aarch64-msvc: 5716.8s -> 6203.3s (+8.5%)
  8. x86_64-gnu-tools: 3587.5s -> 3871.6s (+7.9%)
  9. aarch64-gnu-debug: 4532.4s -> 4183.7s (-7.7%)
  10. dist-various-2: 2400.9s -> 2230.9s (-7.1%)
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 (78865ca): 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)

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

Cycles

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

Binary size

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

Bootstrap: 474.744s -> 476.918s (0.46%)
Artifact size: 397.83 MiB -> 397.86 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 A-tidy Area: The tidy tool merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup 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.

7 participants