Skip to content

Lower to hir::Params for required trait functions - #166147

Merged
rust-bors[bot] merged 6 commits into
rust-lang:mainfrom
JonathanBrouwer:param6
Nov 25, 2026
Merged

rust-bors[bot] merged 6 commits into
rust-lang:mainfrom
JonathanBrouwer:param6

Conversation

@JonathanBrouwer

@JonathanBrouwer JonathanBrouwer commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

View all comments

The same as #166142, but for required trait functions.
Also includes a bunch of cleanup.

I recommend reviewing commit by commit, every commit passes tests.
Earlier commits leave TODOs that are fixed by later commits

Part of #164357
r? Kivooeo

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-clippy Relevant to the Clippy team. 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 Nov 18, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member 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 Nov 18, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Nov 18, 2026
Lower to `hir::Params` for required trait functions
@rust-bors

This comment was marked as outdated.

@rust-timer

This comment has been minimized.

@JonathanBrouwer JonathanBrouwer changed the title Lower to hir::Params for required trait functions Lower to hir::Params for required trait functions Nov 18, 2026
@rust-timer

This comment was marked as outdated.

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Nov 18, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member 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 Nov 23, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Nov 23, 2026
Lower to `hir::Param`s for required trait functions
@JonathanBrouwer
JonathanBrouwer marked this pull request as ready for review November 23, 2026 08:22
@rustbot

rustbot commented Nov 23, 2026

Copy link
Copy Markdown
Collaborator

Changes to the size of AST and/or HIR nodes.

cc @nnethercote

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. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 23, 2026
@rust-bors

rust-bors Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 0f49c8c (0f49c8cbcbce91be3ca4a9bf80ee7dc6087506a6)
Base parent: 5debe6a (5debe6a1244452beced762385f88a51857a915fc)

@rust-timer

This comment has been minimized.

@rustbot

rustbot commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@JonathanBrouwer

JonathanBrouwer commented Nov 24, 2026 •

Copy link
Copy Markdown
Member Author

Processed the feedback
@rustbot ready

I have found other small problem with a comment, but since it was existed before I guess I would just open an issue where I explain it and assign you if you don't mind of such workflow

This works well for me.
If it's just a comment thing and I can fix it in one minute, just including it in this PR as review is better though, not worth the effort to make an entire separate PR for it :)

Comment on lines +142 to +145
let Some((data, scope_owner)) = self.bindings.last_mut() else {
// This pattern is part of a `Param` of a body-less function, skip it
return
};

@Kivooeo Kivooeo Nov 24, 2026 •

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.

This will cause another regression sadly

I believe it should be sufficient to prove invariant (and so keeping an unwrap) by checking that cx.enclosing_body is something

View changes since the review

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Oh right because items can be nested, I will fix that, sorry

@Kivooeo Kivooeo Nov 24, 2026 •

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.

yeah, r=me after replacing this with

        if cx.enclosing_body.is_none() {
            return;
        }

and returning an old unwrap line back (and optionally test it because i haven't :D)

@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@bors r=kivooeo

@rust-bors

rust-bors Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

📌 Commit f4a8ee6 has been tentatively approved by kivooeo

It will be put into the queue for this repository once PR CI succeeds.

@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 Nov 24, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 24, 2026
Lower to `hir::Param`s for required trait functions

The same as rust-lang#166142, but for required trait functions.
Also includes a bunch of cleanup.

I recommend reviewing commit by commit, every commit passes tests.
Earlier commits leave TODOs that are fixed by later commits

Part of rust-lang#164357
r? Kivooeo
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 24, 2026
Lower to `hir::Param`s for required trait functions

The same as rust-lang#166142, but for required trait functions.
Also includes a bunch of cleanup.

I recommend reviewing commit by commit, every commit passes tests.
Earlier commits leave TODOs that are fixed by later commits

Part of rust-lang#164357
r? Kivooeo
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 24, 2026
Lower to `hir::Param`s for required trait functions

The same as rust-lang#166142, but for required trait functions.
Also includes a bunch of cleanup.

I recommend reviewing commit by commit, every commit passes tests.
Earlier commits leave TODOs that are fixed by later commits

Part of rust-lang#164357
r? Kivooeo
rust-bors Bot pushed a commit that referenced this pull request Nov 24, 2026
…uwer

Rollup of 14 pull requests

Successful merges:

 - #165847 (Skip fulfillment when normalization produces no obligations)
 - #166147 (Lower to `hir::Param`s for required trait functions)
 - #166414 (rustdoc: Use source snippet to render `include_*` literals)
 - #166497 (Integrate doc comment target checking on parameters & where bounds)
 - #166500 (Fix float zero patterns after a failed guard)
 - #165791 (Sync tier 3 addition policy with Forge)
 - #166400 (Revert "stabilize {Arc,Rc}::is_unique")
 - #166417 (Correctly specify that the head cannot be >= capacity)
 - #166448 (triagebot: Send "in progress" message when nomination is in progress)
 - #166494 (rustc_target: catch up with LLVM 24 movement on ppc64 openbsd data layout)
 - #166498 (Update the Platform Support page for the *-espidf targets)
 - #166502 ([rustdoc] Fix rustc_private items being marked as unstable in the search results)
 - #166511 (Documentation: clarify Termination::report doc)
 - #166514 (coroutine: unify the word choice)
rust-bors Bot pushed a commit that referenced this pull request Nov 24, 2026
…uwer

Rollup of 14 pull requests

Successful merges:

 - #165847 (Skip fulfillment when normalization produces no obligations)
 - #166147 (Lower to `hir::Param`s for required trait functions)
 - #166414 (rustdoc: Use source snippet to render `include_*` literals)
 - #166497 (Integrate doc comment target checking on parameters & where bounds)
 - #166500 (Fix float zero patterns after a failed guard)
 - #165791 (Sync tier 3 addition policy with Forge)
 - #166400 (Revert "stabilize {Arc,Rc}::is_unique")
 - #166417 (Correctly specify that the head cannot be >= capacity)
 - #166448 (triagebot: Send "in progress" message when nomination is in progress)
 - #166494 (rustc_target: catch up with LLVM 24 movement on ppc64 openbsd data layout)
 - #166498 (Update the Platform Support page for the *-espidf targets)
 - #166502 ([rustdoc] Fix rustc_private items being marked as unstable in the search results)
 - #166511 (Documentation: clarify Termination::report doc)
 - #166514 (coroutine: unify the word choice)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 24, 2026
Lower to `hir::Param`s for required trait functions

The same as rust-lang#166142, but for required trait functions.
Also includes a bunch of cleanup.

I recommend reviewing commit by commit, every commit passes tests.
Earlier commits leave TODOs that are fixed by later commits

Part of rust-lang#164357
r? Kivooeo
rust-bors Bot pushed a commit that referenced this pull request Nov 24, 2026
…uwer

Rollup of 15 pull requests

Successful merges:

 - #166429 (1.100.1 relnotes)
 - #165847 (Skip fulfillment when normalization produces no obligations)
 - #166147 (Lower to `hir::Param`s for required trait functions)
 - #166414 (rustdoc: Use source snippet to render `include_*` literals)
 - #166497 (Integrate doc comment target checking on parameters & where bounds)
 - #166500 (Fix float zero patterns after a failed guard)
 - #165791 (Sync tier 3 addition policy with Forge)
 - #166400 (Revert "stabilize {Arc,Rc}::is_unique")
 - #166417 (Correctly specify that the head cannot be >= capacity)
 - #166448 (triagebot: Send "in progress" message when nomination is in progress)
 - #166494 (rustc_target: catch up with LLVM 24 movement on ppc64 openbsd data layout)
 - #166498 (Update the Platform Support page for the *-espidf targets)
 - #166502 ([rustdoc] Fix rustc_private items being marked as unstable in the search results)
 - #166511 (Documentation: clarify Termination::report doc)
 - #166514 (coroutine: unify the word choice)
rust-bors Bot pushed a commit that referenced this pull request Nov 24, 2026
…uwer

Rollup of 15 pull requests

Successful merges:

 - #166429 (1.100.1 relnotes)
 - #165847 (Skip fulfillment when normalization produces no obligations)
 - #166147 (Lower to `hir::Param`s for required trait functions)
 - #166414 (rustdoc: Use source snippet to render `include_*` literals)
 - #166497 (Integrate doc comment target checking on parameters & where bounds)
 - #166500 (Fix float zero patterns after a failed guard)
 - #165791 (Sync tier 3 addition policy with Forge)
 - #166400 (Revert "stabilize {Arc,Rc}::is_unique")
 - #166417 (Correctly specify that the head cannot be >= capacity)
 - #166448 (triagebot: Send "in progress" message when nomination is in progress)
 - #166494 (rustc_target: catch up with LLVM 24 movement on ppc64 openbsd data layout)
 - #166498 (Update the Platform Support page for the *-espidf targets)
 - #166502 ([rustdoc] Fix rustc_private items being marked as unstable in the search results)
 - #166511 (Documentation: clarify Termination::report doc)
 - #166514 (coroutine: unify the word choice)
rust-bors Bot pushed a commit that referenced this pull request Nov 24, 2026
Rollup of 15 pull requests

Successful merges:

 - #165847 (Skip fulfillment when normalization produces no obligations)
 - #166147 (Lower to `hir::Param`s for required trait functions)
 - #166414 (rustdoc: Use source snippet to render `include_*` literals)
 - #166497 (Integrate doc comment target checking on parameters & where bounds)
 - #166500 (Fix float zero patterns after a failed guard)
 - #165791 (Sync tier 3 addition policy with Forge)
 - #166417 (Correctly specify that the head cannot be >= capacity)
 - #166429 (1.100.1 relnotes)
 - #166448 (triagebot: Send "in progress" message when nomination is in progress)
 - #166494 (rustc_target: catch up with LLVM 24 movement on ppc64 openbsd data layout)
 - #166498 (Update the Platform Support page for the *-espidf targets)
 - #166502 ([rustdoc] Fix rustc_private items being marked as unstable in the search results)
 - #166511 (Documentation: clarify Termination::report doc)
 - #166514 (coroutine: unify the word choice)
 - #166521 (Not-so-pointless change to hashbrown subtree)
@rust-bors
rust-bors Bot merged commit bd902cf into rust-lang:main Nov 25, 2026
14 checks passed
rust-bors Bot pushed a commit that referenced this pull request Nov 25, 2026
Rollup merge of #166147 - JonathanBrouwer:param6, r=kivooeo

Lower to `hir::Param`s for required trait functions

The same as #166142, but for required trait functions.
Also includes a bunch of cleanup.

I recommend reviewing commit by commit, every commit passes tests.
Earlier commits leave TODOs that are fixed by later commits

Part of #164357
r? Kivooeo
@rustbot rustbot added this to the 1.102.0 milestone Nov 25, 2026
clarfonthey pushed a commit to clarfonthey/hashbrown that referenced this pull request Nov 25, 2026
Rollup of 15 pull requests

Successful merges:

 - rust-lang/rust#165847 (Skip fulfillment when normalization produces no obligations)
 - rust-lang/rust#166147 (Lower to `hir::Param`s for required trait functions)
 - rust-lang/rust#166414 (rustdoc: Use source snippet to render `include_*` literals)
 - rust-lang/rust#166497 (Integrate doc comment target checking on parameters & where bounds)
 - rust-lang/rust#166500 (Fix float zero patterns after a failed guard)
 - rust-lang/rust#165791 (Sync tier 3 addition policy with Forge)
 - rust-lang/rust#166417 (Correctly specify that the head cannot be >= capacity)
 - rust-lang/rust#166429 (1.100.1 relnotes)
 - rust-lang/rust#166448 (triagebot: Send "in progress" message when nomination is in progress)
 - rust-lang/rust#166494 (rustc_target: catch up with LLVM 24 movement on ppc64 openbsd data layout)
 - rust-lang/rust#166498 (Update the Platform Support page for the *-espidf targets)
 - rust-lang/rust#166502 ([rustdoc] Fix rustc_private items being marked as unstable in the search results)
 - rust-lang/rust#166511 (Documentation: clarify Termination::report doc)
 - rust-lang/rust#166514 (coroutine: unify the word choice)
 - rust-lang/rust#166521 (Not-so-pointless change to hashbrown subtree)
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-clippy Relevant to the Clippy team. 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.

5 participants