Skip to content

Misc fixes to expr_eagerness#17283

Open
Jarcho wants to merge 9 commits into
rust-lang:masterfrom
Jarcho:eagerness_ext
Open

Misc fixes to expr_eagerness#17283
Jarcho wants to merge 9 commits into
rust-lang:masterfrom
Jarcho:eagerness_ext

Conversation

@Jarcho

@Jarcho Jarcho commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Based on #17228

Changes:

  • The handling of binary and unary operators have been merged to one arm each instead of relying on cascaded match guards. A little large, but it's much more clear how the overlapping cases are handled.
  • Returning if there were any deref adjustments was just wrong. It would miss any lazy and unchangeable expressions.
  • The visitor won't descend into const-evaluated expressions. This does mean something like cfg!(debug_assertions) || return can be suggested for eager evaluation which is notably abnormal code. I plan to rewrite this in a way that fixes this, but I need to finish const-evaluation changes first.
  • References as operator arguments are now handled. They used to return Lazy, but they should return Eager. This is changing them to NoChange so we don't flip the suggestion over a single release.
  • The two new const-evaluation functions don't make too much sense with the current API, but they match how I'm planning to change the API.

changelog: none

@rustbot

rustbot commented Jun 20, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in clippy_lints/src/doc

cc @notriddle

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jun 20, 2026
@rustbot

rustbot commented Jun 20, 2026

Copy link
Copy Markdown
Collaborator

r? @samueltardieu

rustbot has assigned @samueltardieu.
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: 8 candidates
  • 8 candidates expanded to 8 candidates
  • Random selection from dswij, llogiq, samueltardieu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants