Skip to content

Rework lint pass running#158239

Merged
rust-bors[bot] merged 6 commits into
rust-lang:mainfrom
nnethercote:rework-lint-pass-running
Jun 25, 2026
Merged

Rework lint pass running#158239
rust-bors[bot] merged 6 commits into
rust-lang:mainfrom
nnethercote:rework-lint-pass-running

Conversation

@nnethercote

@nnethercote nnethercote commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

View all comments

Some cleanups relating to the running of lint passes.

r? @Urgau

It's a bad name: long, and contains a negative. `skippable_lints` is
better.
In particular, `late_lint_mod` doesn't filter consistently: it only
checks if `builtin_lints` needs running in the `passes.is_empty()` case,
and it doesn't check if the other passes need running at all.
It's called in two cases: pre-expansion lists, and early lints. The
appropriate builtin pass is specified at the call site but the
appropriate other passes are chosen within, which is inconsistent.

This commit changes it so everything is chosen within, based on the
boolean `pre_expansion_lint` parameter. `check_ast_node_inner` is split
into `run_passes` and `run_pass`; the extra function is needed because
the genericness of `builtin_lints` is pushed down one level below
`check_ast_node`.
@rustbot

rustbot commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

clippy is developed in its own repository. If possible, consider making this change to rust-lang/rust-clippy instead.

cc @rust-lang/clippy

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 22, 2026
Comment thread compiler/rustc_lint/src/lib.rs Outdated
@Urgau

Urgau commented Jun 22, 2026

Copy link
Copy Markdown
Member

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jun 22, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jun 22, 2026
@rust-bors

rust-bors Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 9309619 (9309619fbed6f684597cb21e4d42b3451eadf882)
Base parent: 942ac9c (942ac9ce4116d4ea784c9882659372b34978b1f8)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (9309619): comparison URL.

Overall result: ✅ improvements - no action needed

Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -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.3% [-0.9%, -0.1%] 23
Improvements ✅
(secondary)
-0.5% [-1.0%, -0.2%] 34
All ❌✅ (primary) -0.3% [-0.9%, -0.1%] 23

Max RSS (memory usage)

Results (secondary -3.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)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.8% [-4.3%, -3.4%] 2
All ❌✅ (primary) - - 0

Cycles

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

Binary size

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

Bootstrap: 512.761s -> 504.991s (-1.52%)
Artifact size: 353.08 MiB -> 353.62 MiB (0.15%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jun 22, 2026
@nnethercote

Copy link
Copy Markdown
Contributor Author

I have added a new commit renaming pass_must_run as is_lint_pass_required.

@rust-log-analyzer

This comment has been minimized.

@nnethercote nnethercote force-pushed the rework-lint-pass-running branch from 09591e3 to 2724e23 Compare June 23, 2026 00:40

@Urgau Urgau left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

View changes since this review

@Urgau

Urgau commented Jun 23, 2026

Copy link
Copy Markdown
Member

@bors r+

@rust-bors

rust-bors Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 2724e23 has been approved by Urgau

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 Jun 23, 2026
@jhpratt

jhpratt commented Jun 23, 2026

Copy link
Copy Markdown
Member

@bors p=6

threading between rollups

rust-bors Bot pushed a commit that referenced this pull request Jun 25, 2026
Rework lint pass running



Some cleanups relating to the running of lint passes.

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

rust-bors Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

💔 Test for e9e59c9 failed: CI. Failed job:

@JonathanBrouwer

Copy link
Copy Markdown
Contributor

@bors retry

@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 Jun 25, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jun 25, 2026
Rework lint pass running



Some cleanups relating to the running of lint passes.

r? @Urgau
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

A job failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
  TOOLSTATE_PUBLISH: 1
  IMAGE: x86_64-gnu-tools
##[endgroup]
    Updating crates.io index
error: failed to get `num-conv` as a dependency of package `time v0.3.38`
    ... which satisfies dependency `time = "^0.3.16"` of package `cookie_store v0.21.1`
    ... which satisfies dependency `cookie_store = "^0.21.1"` of package `ureq v3.0.8`
    ... which satisfies dependency `ureq = "^3"` of package `citool v0.1.0 (/home/runner/work/rust/rust/src/ci/citool)`

Caused by:
  failed to load source for dependency `num-conv`

Caused by:
  unable to update registry `crates-io`

Caused by:
  download of nu/m-/num-conv failed

Caused by:
  curl failed

Caused by:

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

rust-bors Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

💔 Test for d9b9b74 failed: CI. Failed job:

@JonathanBrouwer

Copy link
Copy Markdown
Contributor

@bors retry

@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 Jun 25, 2026
@rust-bors

This comment has been minimized.

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

A job failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
  WIX: /c/a/rust/rust/wix
##[endgroup]
    Updating crates.io index
error: failed to get `adler2` as a dependency of package `miniz_oxide v0.8.8`
    ... which satisfies dependency `miniz_oxide = "^0.8.5"` of package `flate2 v1.1.9`
    ... which satisfies dependency `flate2 = "^1.1.9"` of package `citool v0.1.0 (C:\a\rust\rust\src\ci\citool)`

Caused by:
  failed to load source for dependency `adler2`

Caused by:
  unable to update registry `crates-io`

Caused by:
  download of ad/le/adler2 failed

Caused by:
  curl failed

Caused by:

@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 Jun 25, 2026
@rust-bors

rust-bors Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: Urgau
Duration: 3h 27m 31s
Pushing 973ad0d to main...

@rust-bors rust-bors Bot merged commit 973ad0d into rust-lang:main Jun 25, 2026
14 of 15 checks passed
@rustbot rustbot added this to the 1.98.0 milestone Jun 25, 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 73100ee (parent) -> 973ad0d (this PR)

Test differences

Show 14 test diffs

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

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 973ad0d0ab149bde2e96422833c1265c7a5be217 --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-tools: 40m 44s -> 1h 1m (+50.7%)
  2. dist-x86_64-illumos: 1h 48m -> 1h 10m (-34.7%)
  3. x86_64-gnu-stable: 1h 52m -> 2h 30m (+33.7%)
  4. dist-x86_64-msvc-alt: 2h 2m -> 2h 43m (+33.5%)
  5. dist-x86_64-apple: 1h 33m -> 1h 59m (+28.1%)
  6. dist-i586-gnu-i586-i686-musl: 1h 15m -> 1h 33m (+24.2%)
  7. aarch64-apple-macos-26: 2h 44m -> 3h 20m (+21.8%)
  8. dist-ohos-x86_64: 1h 17m -> 1h 2m (-19.3%)
  9. pr-check-1: 26m 59s -> 31m 50s (+17.9%)
  10. x86_64-gnu-gcc: 1h 5m -> 56m 13s (-14.6%)
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.

@nnethercote

Copy link
Copy Markdown
Contributor Author

Ninth time's the charm!

@JonathanBrouwer

Copy link
Copy Markdown
Contributor

(It works now because we merged a workaround disabling part of CI #158379)

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (973ad0d): 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.3% [-0.9%, -0.1%] 16
Improvements ✅
(secondary)
-0.5% [-1.0%, -0.2%] 30
All ❌✅ (primary) -0.3% [-0.9%, -0.1%] 16

Max RSS (memory usage)

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

Cycles

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

Binary size

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

Bootstrap: 505.309s -> 509.16s (0.76%)
Artifact size: 353.63 MiB -> 353.81 MiB (0.05%)

@nnethercote nnethercote deleted the rework-lint-pass-running branch June 26, 2026 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-bors This PR was explicitly merged by bors. T-clippy Relevant to the Clippy team. 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