Skip to content

feat: render patterns in params for hovering#18075

Merged
bors merged 5 commits into
rust-lang:masterfrom
roife:fix-issue-17858
Sep 11, 2024
Merged

feat: render patterns in params for hovering#18075
bors merged 5 commits into
rust-lang:masterfrom
roife:fix-issue-17858

Conversation

@roife

@roife roife commented Sep 8, 2024

Copy link
Copy Markdown
Member

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

roife commented Sep 8, 2024

Copy link
Copy Markdown
Member Author

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

Veykril commented Sep 9, 2024

Copy link
Copy Markdown
Member

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

Veykril commented Sep 11, 2024

Copy link
Copy Markdown
Member

@bors r+

@bors

bors commented Sep 11, 2024

Copy link
Copy Markdown
Contributor

📌 Commit 5db510b has been approved by Veykril

It is now in the queue for this repository.

@bors

bors commented Sep 11, 2024

Copy link
Copy Markdown
Contributor

⌛ Testing commit 5db510b with merge c54a827...

@bors

bors commented Sep 11, 2024

Copy link
Copy Markdown
Contributor

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

@bors bors merged commit c54a827 into rust-lang:master Sep 11, 2024
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