Closed
Description
Currently rustdoc will show all items that match the query string, even re-exported ones, which can be kind of frustrating when I get a bunch of results that are actually all the same thing:
I propose that instead we only index the original item, not any of the re-exports. I am not saying that we don't inline documentation from the original, just that we only store the original in the search index.
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
jyn514 commentedon Nov 4, 2020
The original is not usually the canonical one, though :/ consider
std::collections::HashMap
, which is actually defined instd::collections::hash::map::HashMap
.I've been wanting
#[canonical]
for a while now and I think this would fit, see https://discord.com/channels/442252698964721669/459149231702278154/771465736190558258 for some discussion. Sorry I don't have a write-up anywhere.jyn514 commentedon Nov 4, 2020
@camelid why did you open a new issue instead of using #15723? Is there something else going on?
camelid commentedon Nov 4, 2020
My understanding was that this issue is a subset of what's talked about in #15723, and this way we have a way to track just this part of it. It looks like QuietMisdreavus commented about this at #15723 (comment), but it was long enough that I hadn't fully read it before :)
jyn514 commentedon Nov 4, 2020
I don't think there's anything in #15723 not covered here. The things listed in the description are just suggestions for fixing it, but after the discussion later in the issue it looks like they won't be the way it ends up being fixed.