Skip to content

Print HRTB binders before fn qualifiers#156058

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
qaijuang:issue-151393
May 5, 2026
Merged

Print HRTB binders before fn qualifiers#156058
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
qaijuang:issue-151393

Conversation

@qaijuang
Copy link
Copy Markdown
Contributor

@qaijuang qaijuang commented May 1, 2026

Fixes #151393

This PR updates the custom fn-signature diff used in type mismatch diagnostics to print higher-ranked binders before fn qualifiers.

We might want to update reference also: https://github.com/rust-lang/reference/blob/581920f9109f141b88b860b3e1e8359e3896a150/src/items/external-blocks.md?plain=1#L60

@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 May 1, 2026
@qaijuang
Copy link
Copy Markdown
Contributor Author

qaijuang commented May 1, 2026

cc @lynzrand

@qaijuang qaijuang marked this pull request as ready for review May 1, 2026 19:56
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 1, 2026
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label May 1, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 1, 2026

r? @JohnTitor

rustbot has assigned @JohnTitor.
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 21 candidates

Copy link
Copy Markdown
Member

@JohnTitor JohnTitor left a comment

Choose a reason for hiding this comment

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

LGTM. @bors r+

We might want to update reference also

Yeah, it'd make sense.

View changes since this review

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 5, 2026

📌 Commit 5dfe784 has been approved by JohnTitor

It is now in the queue for this repository.

@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 May 5, 2026
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request May 5, 2026
Print HRTB binders before fn qualifiers

Fixes rust-lang#151393

This PR updates the custom fn-signature diff used in type mismatch diagnostics to print higher-ranked binders before fn qualifiers.

We might want to update reference also: https://github.com/rust-lang/reference/blob/581920f9109f141b88b860b3e1e8359e3896a150/src/items/external-blocks.md?plain=1#L60
rust-bors Bot pushed a commit that referenced this pull request May 5, 2026
…uwer

Rollup of 7 pull requests

Successful merges:

 - #156014 (resolve: Catch "cannot reexport" errors from macros 2.0 better)
 - #156058 (Print HRTB binders before fn qualifiers)
 - #156172 (Implement a new flag `-Zdisable-fast-paths` in trait solving)
 - #156184 (Revert "remove `MethodReceiverExpr` special-casing")
 - #155957 (Revert const hacks and use const closures in std)
 - #156127 (Update `askama` version to `0.16.0`)
 - #156183 (Remove duplicate debug assert)
rust-bors Bot pushed a commit that referenced this pull request May 5, 2026
…uwer

Rollup of 7 pull requests

Successful merges:

 - #156014 (resolve: Catch "cannot reexport" errors from macros 2.0 better)
 - #156058 (Print HRTB binders before fn qualifiers)
 - #156172 (Implement a new flag `-Zdisable-fast-paths` in trait solving)
 - #156184 (Revert "remove `MethodReceiverExpr` special-casing")
 - #155957 (Revert const hacks and use const closures in std)
 - #156127 (Update `askama` version to `0.16.0`)
 - #156183 (Remove duplicate debug assert)
rust-bors Bot pushed a commit that referenced this pull request May 5, 2026
…uwer

Rollup of 7 pull requests

Successful merges:

 - #156014 (resolve: Catch "cannot reexport" errors from macros 2.0 better)
 - #156058 (Print HRTB binders before fn qualifiers)
 - #156172 (Implement a new flag `-Zdisable-fast-paths` in trait solving)
 - #156184 (Revert "remove `MethodReceiverExpr` special-casing")
 - #155957 (Revert const hacks and use const closures in std)
 - #156127 (Update `askama` version to `0.16.0`)
 - #156183 (Remove duplicate debug assert)
@rust-bors rust-bors Bot merged commit 73e5912 into rust-lang:main May 5, 2026
11 checks passed
@rustbot rustbot added this to the 1.97.0 milestone May 5, 2026
rust-timer added a commit that referenced this pull request May 5, 2026
Rollup merge of #156058 - qaijuang:issue-151393, r=JohnTitor

Print HRTB binders before fn qualifiers

Fixes #151393

This PR updates the custom fn-signature diff used in type mismatch diagnostics to print higher-ranked binders before fn qualifiers.

We might want to update reference also: https://github.com/rust-lang/reference/blob/581920f9109f141b88b860b3e1e8359e3896a150/src/items/external-blocks.md?plain=1#L60
@qaijuang qaijuang deleted the issue-151393 branch May 6, 2026 08:43
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.

Diagnostic type format doesn't match actual type when higher-rank lifetime bound and extern fn are both involved

3 participants