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

Hover details show unexpected crate name/path #5771

Closed
samhedin opened this issue Aug 16, 2020 · 4 comments
Closed

Hover details show unexpected crate name/path #5771

samhedin opened this issue Aug 16, 2020 · 4 comments

Comments

@samhedin
Copy link

Hey! I hope that this hasn't been posted before. I searched and could not find anything.

I expect the first line of the hover details to show std::collections::HashMap. Instead, it shows std::collections::hash::map.
pic

@samhedin samhedin changed the title Hover details show incorrect crate name/path Hover details show unexpected crate name/path Aug 16, 2020
@bjorn3
Copy link
Member

bjorn3 commented Aug 16, 2020

std::collections::hash::map::HashMap is the full path of HashMap. std::collections::HashMap is just a re-export.

https://github.com/rust-lang/rust/blob/de32266a1780aa4ef748ce7f6200a1554fad0aca/library/std/src/collections/hash/map.rs#L200

https://github.com/rust-lang/rust/blob/de32266a1780aa4ef748ce7f6200a1554fad0aca/library/std/src/collections/mod.rs#L425

@samhedin
Copy link
Author

samhedin commented Aug 16, 2020

I see - I figured that something like this would be the case. Is there a way to get the re-exported path instead?
Thank you!

@bjorn3
Copy link
Member

bjorn3 commented Aug 16, 2020

Rustc has the same problem with error messages: rust-lang/rust#21934

@samhedin
Copy link
Author

samhedin commented Aug 16, 2020

Figures someone reported it 5 years before me. I understand that this isn't a priority for most people, I'll keep an eye on it though. Thank you 💯

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

No branches or pull requests

2 participants