Point to correct argument in Func Call when Self type fails trait bound#143567
Merged
bors merged 2 commits intorust-lang:masterfrom Jul 8, 2025
Merged
Point to correct argument in Func Call when Self type fails trait bound#143567bors merged 2 commits intorust-lang:masterfrom
bors merged 2 commits intorust-lang:masterfrom
Conversation
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
When a trait bound fails due to the Self type parameter, adjust_fulfillment_errors now correctly points to the corresponding function argument instead of incorrectly pointing to other arguments. Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
Contributor
|
r? compiler-errors @bors r+ rollup |
Collaborator
bors
added a commit
that referenced
this pull request
Jul 8, 2025
Rollup of 7 pull requests Successful merges: - #142098 (Implement `int_format_into` feature) - #143567 (Point to correct argument in Func Call when Self type fails trait bound) - #143570 (consider nested cases for duplicate RPITIT) - #143571 (remove `has_nested` from builtin candidates) - #143586 (Fix wrong cache event query key) - #143589 (const-block-as-pattern: do not refer to no-longer-existing nightly feature) - #143608 (Fix in std::String docs) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
that referenced
this pull request
Jul 8, 2025
Rollup merge of #143567 - xizheyin:143336, r=compiler-errors Point to correct argument in Func Call when Self type fails trait bound Fixes #143336 When a trait bound fails due to the `Self` type parameter, `adjust_fulfillment_errors` now correctly points to the corresponding function argument instead of incorrectly pointing to other arguments. This is because `Call` may also need to handle the `self` parameter, and not just `MethodCall` needs to be handled, as #143336. r? compiler
Contributor
|
Thank you! :3 |
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.
Fixes #143336
When a trait bound fails due to the
Selftype parameter,adjust_fulfillment_errorsnow correctly points to the corresponding function argument instead of incorrectly pointing to other arguments. This is becauseCallmay also need to handle theselfparameter, and not justMethodCallneeds to be handled, as #143336.r? compiler