Skip to content

rustdoc: Fix duplicated impls with generics #45620

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 1 commit into from
Nov 7, 2017

Conversation

ollie27
Copy link
Member

@ollie27 ollie27 commented Oct 29, 2017

The same type can appear multiple times in impls so we need to use a set
to avoid adding it multiple times.

Fixes: #45584

The same type can appear multiple times in impls so we need to use a set
to avoid adding it multiple times.
@rust-highfive
Copy link
Contributor

r? @frewsxcv

(rust_highfive has picked a reviewer for you, use r? to override)

@frewsxcv
Copy link
Member

reassigning to someone from dev-tools team

@GuillaumeGomez
Copy link
Member

GuillaumeGomez commented Oct 30, 2017

I think that the order won't be kept with only the set. You need both a Vec and a Set.

@kennytm kennytm added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 30, 2017
@frewsxcv
Copy link
Member

I'm not sure about a FxHashSet but order is preserved with a BTreeSet

@QuietMisdreavus
Copy link
Member

Right, but is that the order of the DefIds or the order of the pushes? Anyway, it shouldn't matter because the Set in question isn't the global set but a local list of items to add a single impl to. The order in which you choose lists to push to shouldn't matter if there's only one item you're pushing at a time.

@ollie27
Copy link
Member Author

ollie27 commented Oct 31, 2017

I think that the order won't be kept with only the set.

The order of what? This is just gathering DefIds to use as keys to insert into a HashMap and it doesn't matter what order we insert into the HashMap. FxHashSet is deterministic if that's what you're worried about.

@kennytm kennytm added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 1, 2017
@carols10cents
Copy link
Member

review ping @QuietMisdreavus or @GuillaumeGomez!

@QuietMisdreavus
Copy link
Member

@bors r+

Sorry for letting this get stale!

@bors
Copy link
Collaborator

bors commented Nov 6, 2017

📌 Commit 676b4bb has been approved by QuietMisdreavus

@kennytm kennytm added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 7, 2017
kennytm added a commit to kennytm/rust that referenced this pull request Nov 7, 2017
…r=QuietMisdreavus

rustdoc: Fix duplicated impls with generics

The same type can appear multiple times in impls so we need to use a set
to avoid adding it multiple times.

Fixes: rust-lang#45584
@bors
Copy link
Collaborator

bors commented Nov 7, 2017

⌛ Testing commit 676b4bb with merge 3e7f501...

bors added a commit that referenced this pull request Nov 7, 2017
…reavus

rustdoc: Fix duplicated impls with generics

The same type can appear multiple times in impls so we need to use a set
to avoid adding it multiple times.

Fixes: #45584
@bors
Copy link
Collaborator

bors commented Nov 7, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: QuietMisdreavus
Pushing 3e7f501 to master...

@bors bors merged commit 676b4bb into rust-lang:master Nov 7, 2017
@ollie27 ollie27 deleted the rustdoc_impl_generic_dupe branch November 7, 2017 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants