Skip to content

rustdoc: Fix duplicated impls with generics - #45620

Merged
bors merged 1 commit into
rust-lang:masterfrom
ollie27:rustdoc_impl_generic_dupe
Nov 7, 2017
Merged

rustdoc: Fix duplicated impls with generics#45620
bors merged 1 commit into
rust-lang:masterfrom
ollie27:rustdoc_impl_generic_dupe

Conversation

@ollie27

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

r? @frewsxcv

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

@frewsxcv

Copy link
Copy Markdown
Contributor

reassigning to someone from dev-tools team

@GuillaumeGomez

GuillaumeGomez commented Oct 30, 2017

Copy link
Copy Markdown
Member

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

@kennytmkennytm 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
Copy Markdown
Contributor

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

@QuietMisdreavus

Copy link
Copy Markdown
Contributor

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
Copy Markdown
ContributorAuthor

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.

@kennytmkennytm 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
Copy Markdown
Member

review ping @QuietMisdreavus or @GuillaumeGomez!

@QuietMisdreavus

Copy link
Copy Markdown
Contributor

@bors r+

Sorry for letting this get stale!

@bors

bors commented Nov 6, 2017

Copy link
Copy Markdown
Collaborator

📌 Commit 676b4bb has been approved by QuietMisdreavus

@kennytmkennytm 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
@kennytmkennytm mentioned this pull request 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

bors commented Nov 7, 2017

Copy link
Copy Markdown
Collaborator

⌛ 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

bors commented Nov 7, 2017

Copy link
Copy Markdown
Collaborator

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

@bors
bors merged commit 676b4bb into rust-lang:masterNov 7, 2017
@ollie27
ollie27 deleted the rustdoc_impl_generic_dupe branch November 7, 2017 15:39
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: 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

@ollie27@rust-highfive@frewsxcv@GuillaumeGomez@QuietMisdreavus@carols10cents@bors@kennytm