Skip to content

Simplify HardwiredLints and SoftLints#158006

Merged
rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
nnethercote:simplify-HardwiredLints-SoftLints
Jun 17, 2026
Merged

Simplify HardwiredLints and SoftLints#158006
rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
nnethercote:simplify-HardwiredLints-SoftLints

Conversation

@nnethercote

Copy link
Copy Markdown
Contributor

Details in individual commits.

r? @Urgau

To get a `LintVec` for a lint pass we sometimes use `get_lints` and
sometimes use `lint_vec`. It would be nice to only have one, but doing
that is tricky.

In the meantime, this commit makes the naming more consistent.
- By always using the name `get_lints` for the methods that take `self`.
- By always using the name `lint_vec` for the methods that have no
  parameters.
These are both types that impl `LintPass` but in a degenerate way: only
the `lint_vec` method is ever used. This commit changes them to just be
a `lint_vec` function in an appropriately-named module.

The commit also removes the use of `HardwiredLints` in
`late_lint_crate`, which had no effect because all the
`HardwiredLints::check_*` methods were no-ops.
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Jun 17, 2026
@nnethercote

Copy link
Copy Markdown
Contributor Author

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

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jun 17, 2026
…, r=<try>

Simplify `HardwiredLints` and `SoftLints`
@rust-bors

rust-bors Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 5ecf8cd (5ecf8cdfdefffce5a4113b4a7939ca0e75b2b2d2, parent: 1c0f17520a62ebdb757b5015633e0fab2df553a4)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (5ecf8cd): comparison URL.

Overall result: no relevant changes - no action needed

Benchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up.

@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

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

Max RSS (memory usage)

Results (primary 0.4%, secondary 3.4%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

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

Cycles

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

Binary size

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

Bootstrap: 523.093s -> 532.431s (1.79%)
Artifact size: 401.36 MiB -> 401.32 MiB (-0.01%)

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

@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.

I always wondered if we really needed those fake lint pass ;-)

Thanks for cleaning that up.

View changes since this review

@Urgau

Urgau commented Jun 17, 2026

Copy link
Copy Markdown
Member

@bors r+ rollup

@rust-bors

rust-bors Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 7dcc2dc 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 17, 2026
rust-bors Bot pushed a commit that referenced this pull request Jun 17, 2026
…uwer

Rollup of 6 pull requests

Successful merges:

 - #157816 (make more slice mutable ref getters rustc_no_writable)
 - #156788 (Document that destructors in running threads are not run on program exit)
 - #157957 (Add documentation for the `must_use` attribute)
 - #158006 (Simplify `HardwiredLints` and `SoftLints`)
 - #158007 (Pin dependencies)
 - #158025 (Enable `symbol_intern_string_literal` lint for rustdoc)
@rust-bors rust-bors Bot merged commit 1113eb0 into rust-lang:main Jun 17, 2026
14 checks passed
@rustbot rustbot added this to the 1.98.0 milestone Jun 17, 2026
@nnethercote nnethercote deleted the simplify-HardwiredLints-SoftLints branch June 17, 2026 22:17
pull Bot pushed a commit to xtqqczze/rust-lang-miri that referenced this pull request Jun 18, 2026
…uwer

Rollup of 6 pull requests

Successful merges:

 - rust-lang/rust#157816 (make more slice mutable ref getters rustc_no_writable)
 - rust-lang/rust#156788 (Document that destructors in running threads are not run on program exit)
 - rust-lang/rust#157957 (Add documentation for the `must_use` attribute)
 - rust-lang/rust#158006 (Simplify `HardwiredLints` and `SoftLints`)
 - rust-lang/rust#158007 (Pin dependencies)
 - rust-lang/rust#158025 (Enable `symbol_intern_string_literal` lint for rustdoc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants