Skip to content

Simplify Config::track_state.#155671

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
nnethercote:simplify-Config-track_state
Apr 24, 2026
Merged

Simplify Config::track_state.#155671
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
nnethercote:simplify-Config-track_state

Conversation

@nnethercote
Copy link
Copy Markdown
Contributor

@nnethercote nnethercote commented Apr 23, 2026

This is a callback used to track otherwise untracked state. It was added in #116731 for Clippy. (It was originally named hash_untracked_state, and examples in the rustc-dev-guide still use that name.) The StableHasher argument is unused, and probably has never been used. There is a FIXME comment pointing this out, which was added more than a year ago.

This commit removes the StableHasher callback argument. This also removes the need for Options::untracked_state_hash.

r? @bjorn3

This is a callback used to track otherwise untracked state. It was added
in rust-lang#116731 for Clippy. (It was originally named `hash_untracked_state`,
and examples in the rustc-dev-guide still use that name.) The
`StableHasher` argument is unused, and probably has never been used.
There is a FIXME comment pointing this out, which was added more than a
year ago.

This commit removes the `StableHasher` callback argument. This also
removes the need for `Options::untracked_state_hash`.
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 23, 2026

The rustc-dev-guide subtree was changed. If this PR only touches the dev guide consider submitting a PR directly to rust-lang/rustc-dev-guide otherwise thank you for updating the dev guide with your changes.

cc @BoxyUwU, @tshepang

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

@rustbot rustbot added A-rustc-dev-guide Area: rustc-dev-guide 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 Apr 23, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 23, 2026

⚠️ Warning ⚠️

  • There are issue links (such as #123) in the commit messages of the following commits.
    Please move them to the PR description, to avoid spamming the issues with references to the commit, and so this bot can automatically canonicalize them to avoid issues with subtree.

@nnethercote
Copy link
Copy Markdown
Contributor Author

nnethercote commented Apr 23, 2026

cc @Alexendoo @blyxyas for some Clippy dev eyes on this.

Copy link
Copy Markdown
Member

@bjorn3 bjorn3 left a comment

Choose a reason for hiding this comment

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

LGTM. r=me once your get a reply from the clippy folks.

View changes since this review

Copy link
Copy Markdown
Member

@Alexendoo Alexendoo left a comment

Choose a reason for hiding this comment

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

Yeah removing it is fine with me, I never got around to moving clippy lints over to module passes. It could always be reintroduced in the future when it would actually be used

View changes since this review

@blyxyas
Copy link
Copy Markdown
Member

blyxyas commented Apr 23, 2026

If the original intent was as part of moving Clippy lints to module passes, then yeah we can remove it.

Moving Clippy lints to module passes would complicate lint filtering.

@bjorn3
Copy link
Copy Markdown
Member

bjorn3 commented Apr 23, 2026

@bors r+

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 23, 2026

📌 Commit 3c5e7e8 has been approved by bjorn3

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 Apr 23, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Apr 23, 2026
…state, r=bjorn3

Simplify `Config::track_state`.

This is a callback used to track otherwise untracked state. It was added in rust-lang#116731 for Clippy. (It was originally named `hash_untracked_state`, and examples in the rustc-dev-guide still use that name.) The `StableHasher` argument is unused, and probably has never been used. There is a FIXME comment pointing this out, which was added more than a year ago.

This commit removes the `StableHasher` callback argument. This also removes the need for `Options::untracked_state_hash`.

r? @bjorn3
@nnethercote
Copy link
Copy Markdown
Contributor Author

Thanks for the fast responses, everyone!

rust-bors Bot pushed a commit that referenced this pull request Apr 23, 2026
…uwer

Rollup of 7 pull requests

Successful merges:

 - #155621 (Document #[diagnostic::on_move] in the unstable book.)
 - #155671 (Simplify `Config::track_state`.)
 - #153482 (tests/ui/macros: add annotations for reference rules)
 - #155075 (Add docs about SDKs and C compilation on armv7a-vex-v5)
 - #155685 (Fix `get_child_at_index` return type hints)
 - #155686 (Fix array template arg lookup behavior)
 - #155690 (Fix classify_union to return Union for regular unions)
@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 Apr 24, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 24, 2026

☀️ Test successful - CI
Approved by: bjorn3
Duration: 3h 21m 21s
Pushing 9836b06 to main...

@rust-bors rust-bors Bot merged commit 9836b06 into rust-lang:main Apr 24, 2026
12 checks passed
@rustbot rustbot added this to the 1.97.0 milestone Apr 24, 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 36ba2c7 (parent) -> 9836b06 (this PR)

Test differences

Show 2 test diffs

2 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 9836b06b55f5389f605ee7766eeecd9f17a86cb5 --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. i686-gnu-nopt-2: 2h 18m -> 1h 43m (-24.9%)
  2. dist-aarch64-apple: 2h 17m -> 1h 44m (-24.0%)
  3. x86_64-gnu-stable: 1h 54m -> 2h 19m (+21.3%)
  4. dist-x86_64-solaris: 1h 37m -> 1h 17m (-20.9%)
  5. dist-various-1: 1h 11m -> 57m 3s (-20.0%)
  6. dist-powerpc64-linux-gnu: 1h 31m -> 1h 15m (-17.6%)
  7. x86_64-rust-for-linux: 55m 6s -> 45m 27s (-17.5%)
  8. i686-gnu-1: 2h 20m -> 1h 56m (-17.2%)
  9. i686-gnu-2: 1h 44m -> 1h 29m (-14.9%)
  10. x86_64-gnu-gcc: 1h 10m -> 1h (-14.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
Copy Markdown
Collaborator

Finished benchmarking commit (9836b06): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

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

Max RSS (memory usage)

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

Cycles

Results (secondary -2.9%)

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)
-2.9% [-3.9%, -2.2%] 3
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 490.512s -> 493.683s (0.65%)
Artifact size: 394.34 MiB -> 394.30 MiB (-0.01%)

@nnethercote nnethercote deleted the simplify-Config-track_state branch April 24, 2026 04:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-rustc-dev-guide Area: rustc-dev-guide 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.

6 participants