Always generate generics in delegation that match trait in trait impl scenario#153705
Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom Mar 12, 2026
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
f413a06 to
23a51f5
Compare
tests/ui/delegation/generics/impl-trait-to-free-and-trait-errors.rs
Outdated
Show resolved
Hide resolved
Contributor
Author
|
@rustbot ready |
Contributor
|
r=me after addressing #153705 (comment) and squashing commits. |
Collaborator
|
Reminder, once the PR becomes ready for a review, use |
fee1ded to
d87d7b9
Compare
Contributor
Author
|
@rustbot ready |
Contributor
|
@bors r+ |
Contributor
Contributor
|
⌛ Testing commit d87d7b9 with merge 353e13e... Workflow: https://github.com/rust-lang/rust/actions/runs/23008037396 |
rust-bors bot
pushed a commit
that referenced
this pull request
Mar 12, 2026
…etrochenkov Always generate generics in delegation that match trait in trait impl scenario After #151864 there is a change in delegation code generation in `trait impl` cases: after #151864 we started to look at user-specified args and generate functions, whose generics may not match the signature of the function that is defined in trait. Such handling of delegation from trait impl is not correct, as the generated function should always have the same generics as its signature function in trait. This addresses the "Fix generic params generation in trait impl case" future work from #151864 r? @petrochenkov
Contributor
|
@bors yield |
Contributor
|
@bors yield |
Contributor
|
Auto build was cancelled. Cancelled workflows: The next pull request likely to be tested is #153783. |
rust-bors bot
pushed a commit
that referenced
this pull request
Mar 12, 2026
…uwer Rollup of 5 pull requests Successful merges: - #153705 (Always generate generics in delegation that match trait in trait impl scenario) - #153751 (Detect existing turbofish on method calls to suppress useless suggestion) - #153780 (Remove `MTLock`) - #151572 (Fix Hexagon ABI calling convention for small aggregates) - #153725 (Fix that `./x test --no-doc` actually keeps the same behaviour for backwards compatability)
Contributor
|
❗ There is currently no auto build in progress on this PR. |
github-actions bot
pushed a commit
to rust-lang/rustc-dev-guide
that referenced
this pull request
Mar 16, 2026
…uwer Rollup of 5 pull requests Successful merges: - rust-lang/rust#153705 (Always generate generics in delegation that match trait in trait impl scenario) - rust-lang/rust#153751 (Detect existing turbofish on method calls to suppress useless suggestion) - rust-lang/rust#153780 (Remove `MTLock`) - rust-lang/rust#151572 (Fix Hexagon ABI calling convention for small aggregates) - rust-lang/rust#153725 (Fix that `./x test --no-doc` actually keeps the same behaviour for backwards compatability)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After #151864 there is a change in delegation code generation in
trait implcases: after #151864 we started to look at user-specified args and generate functions, whose generics may not match the signature of the function that is defined in trait. Such handling of delegation from trait impl is not correct, as the generated function should always have the same generics as its signature function in trait.This addresses the "Fix generic params generation in trait impl case" future work from #151864. Part of #118212.
r? @petrochenkov