Skip to content

feat: render patterns in params for hovering #18075

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 5 commits into from
Sep 11, 2024

Conversation

roife
Copy link
Member

@roife roife commented Sep 8, 2024

Fix #17858

This PR introduces an option to hir-def/src/body/pretty.rs to render the result as a single line, which is then reused for rendering patterns in parameters for hovering.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 8, 2024
@roife
Copy link
Member Author

roife commented Sep 8, 2024

The only issue now is that we are rendering fn test(Point { x, y }: Point) {} as fn test(Point { x: x, y: y }: Point) {}. Can we just modify pretty.rs, although this might change the output of hir_view? 👀

@Veykril
Copy link
Member

Veykril commented Sep 9, 2024

The only issue now is that we are rendering fn test(Point { x, y }: Point) {} as fn test(Point { x: x, y: y }: Point) {}. Can we just modify pretty.rs, although this might change the output of hir_view? 👀

Yes lets adjust that

@Veykril
Copy link
Member

Veykril commented Sep 11, 2024

@bors r+

@bors
Copy link
Contributor

bors commented Sep 11, 2024

📌 Commit 5db510b has been approved by Veykril

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Sep 11, 2024

⌛ Testing commit 5db510b with merge c54a827...

@bors
Copy link
Contributor

bors commented Sep 11, 2024

☀️ Test successful - checks-actions
Approved by: Veykril
Pushing c54a827 to master...

@bors bors merged commit c54a827 into rust-lang:master Sep 11, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect parameter names preview when tuple destructuring is involed.
4 participants