Skip to content
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

Display fully qualified associated types correctly #15416

Merged
merged 1 commit into from Aug 8, 2023

Conversation

oxalica
Copy link
Contributor

@oxalica oxalica commented Aug 8, 2023

Currently they are formatted in the internal Trait<Self = Type>::Assoc forms where hir_ty::TypeRef is formatted, like hover.

There is no test of TypeRef::hir_fmt in crate hir-ty (verified by replacing it with a panic!()), most tests are about inference and printing the real Ty instead of TypeRef. So I added the test in ide::hover.

Currently they are formatted in the internal `Trait<Self = Type>::Assoc`
forms where `hir_ty::TypeRef` is formatted, like hover.
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 8, 2023
@lowr
Copy link
Contributor

lowr commented Aug 8, 2023

Thanks so much for this! I've definitely seen it a few times but didn't get to fix it.

@bors r+

@bors
Copy link
Collaborator

bors commented Aug 8, 2023

📌 Commit 3bfe1d5 has been approved by lowr

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Aug 8, 2023

⌛ Testing commit 3bfe1d5 with merge 6918eb6...

@bors
Copy link
Collaborator

bors commented Aug 8, 2023

☀️ Test successful - checks-actions
Approved by: lowr
Pushing 6918eb6 to master...

@bors bors merged commit 6918eb6 into rust-lang:master Aug 8, 2023
10 checks passed
@oxalica oxalica deleted the fix/hover-assoc-type branch August 8, 2023 17:28
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.

None yet

4 participants