Skip to content

Remove has_delayed_lints optimization#158193

Merged
rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
JonathanBrouwer:late-lint-experiment
Jun 21, 2026
Merged

Remove has_delayed_lints optimization#158193
rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
JonathanBrouwer:late-lint-experiment

Conversation

@JonathanBrouwer

@JonathanBrouwer JonathanBrouwer commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Keeping track of has_delayed_lints doesn't seem to have a perf effect anymore so let's not make the code more complicated than needed. These flags were previously used so we don't have to iterate over all hir owners, but iterating over all hir owners seems fast enough

cc @jdonszelmann

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 20, 2026
@JonathanBrouwer

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

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jun 20, 2026
[Perf] Remove `has_delayed_lints` optimization
@rust-log-analyzer

This comment has been minimized.

@rust-bors

rust-bors Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 769fdb0 (769fdb05279e59539822aa4a83da2067424cbe1f)
Base parent: 8b6558a (8b6558a02b2774acfb25cf15e199467c37ba7490)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (769fdb0): comparison URL.

Overall result: ✅ improvements - 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

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

Max RSS (memory usage)

Results (primary 1.7%, secondary 1.2%)

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

mean range count
Regressions ❌
(primary)
1.7% [1.3%, 2.0%] 3
Regressions ❌
(secondary)
3.1% [2.2%, 4.0%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.6% [-2.6%, -2.6%] 1
All ❌✅ (primary) 1.7% [1.3%, 2.0%] 3

Cycles

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

Binary size

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

Bootstrap: 482.01s -> 481.514s (-0.10%)
Artifact size: 391.28 MiB -> 391.27 MiB (-0.00%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jun 21, 2026
@JonathanBrouwer JonathanBrouwer changed the title [Perf] Remove has_delayed_lints optimization Remove has_delayed_lints optimization Jun 21, 2026
@JonathanBrouwer
JonathanBrouwer marked this pull request as ready for review June 21, 2026 06:58
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 21, 2026
@rustbot

rustbot commented Jun 21, 2026

Copy link
Copy Markdown
Collaborator

r? @nikomatsakis

rustbot has assigned @nikomatsakis.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 73 candidates
  • Random selection from 18 candidates

@rust-log-analyzer

This comment has been minimized.

LL - #![no_mangle]
|

warning: unused attribute

@JonathanBrouwer JonathanBrouwer Jun 21, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

All the stderr diffs are diagnostics getting re-ordered, because the iteration order might now be different. I don't think the order got necessarily better or worse

View changes since the review

@jdonszelmann

Copy link
Copy Markdown
Contributor

This looks nice. Wonder what made it less expensive hehe.

r? me
@bors r+ rollup

@rust-bors

rust-bors Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

📌 Commit f72b866 has been approved by jdonszelmann

It is now in the queue for this repository.

@rust-bors rust-bors Bot added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jun 21, 2026
@rust-bors rust-bors Bot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 21, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 21, 2026
…nt, r=jdonszelmann

Remove `has_delayed_lints` optimization

Keeping track of `has_delayed_lints` doesn't seem to have a perf effect anymore so let's not make the code more complicated than needed. These flags were previously used so we don't have to iterate over all hir owners, but iterating over all hir owners seems fast enough

cc @jdonszelmann
rust-bors Bot pushed a commit that referenced this pull request Jun 21, 2026
…uwer

Rollup of 4 pull requests

Successful merges:

 - #155439 (Enable Cargo's new build-dir layout)
 - #157942 (Do not use desugared local names in tail_expr_drop_order diagnostics)
 - #158193 (Remove `has_delayed_lints` optimization)
 - #158204 (More general assert in Interner const fn check)
@rust-bors
rust-bors Bot merged commit 45e0ded into rust-lang:main Jun 21, 2026
13 checks passed
@rustbot rustbot added this to the 1.98.0 milestone Jun 21, 2026
rust-timer added a commit that referenced this pull request Jun 21, 2026
Rollup merge of #158193 - JonathanBrouwer:late-lint-experiment, r=jdonszelmann

Remove `has_delayed_lints` optimization

Keeping track of `has_delayed_lints` doesn't seem to have a perf effect anymore so let's not make the code more complicated than needed. These flags were previously used so we don't have to iterate over all hir owners, but iterating over all hir owners seems fast enough

cc @jdonszelmann
pull Bot pushed a commit to xtqqczze/rust-lang-miri that referenced this pull request Jun 22, 2026
…uwer

Rollup of 4 pull requests

Successful merges:

 - rust-lang/rust#155439 (Enable Cargo's new build-dir layout)
 - rust-lang/rust#157942 (Do not use desugared local names in tail_expr_drop_order diagnostics)
 - rust-lang/rust#158193 (Remove `has_delayed_lints` optimization)
 - rust-lang/rust#158204 (More general assert in Interner const fn check)
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants