Skip to content

fix: resolve item in match bind #20120

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 3, 2025

Conversation

Hmikihiro
Copy link
Contributor

Close: #19813

I think match bindings cannot refer to type items, so struct and other item should be resolved as value.
This PR resolves only value paths in match bindings.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 28, 2025
Copy link
Contributor

@ChayimFriedman2 ChayimFriedman2 left a comment

Choose a reason for hiding this comment

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

As you said, this only solves the case of a single identifier, but that's also something.

I commented just one minor nit.

@ChayimFriedman2
Copy link
Contributor

Can you squash?

Signed-off-by: Hayashi Mikihiro <[email protected]>
@Hmikihiro Hmikihiro force-pushed the match_bind_not_type branch from e5eafda to 07a1b4e Compare July 3, 2025 14:58
@Hmikihiro
Copy link
Contributor Author

Can you squash?

Yes, I’ve squashed and pushed.

@ChayimFriedman2
Copy link
Contributor

Thanks!

@ChayimFriedman2 ChayimFriedman2 added this pull request to the merge queue Jul 3, 2025
Merged via the queue into rust-lang:master with commit c0d9c95 Jul 3, 2025
15 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hover returns info about wrong item, when multiple items with the same name imported
3 participants