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

Fix rustdoc infinitely recursing when an external crate reexports itself #41172

Merged
merged 1 commit into from
Apr 15, 2017

Conversation

Aaron1011
Copy link
Member

@Aaron1011 Aaron1011 commented Apr 9, 2017

Previously, rustdoc's LibEmbargoVisitor unconditionally visited the
child modules of an external crate. If a module re-exported its parent
via pub use super::*, rustdoc would re-walk the parent, leading to
infinite recursion.

This commit makes LibEmbargoVisitor store already visited modules in an
FxHashSet, ensuring that each module is only walked once.

Fixes #40936

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @frewsxcv (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

Previously, rustdoc's LibEmbargoVisitor unconditionally visited the
child modules of an external crate. If a module re-exported its parent
via 'pub use super::*', rustdoc would re-walk the parent, leading to
infinite recursion.

This commit makes LibEmbargoVisitor store already visited modules in an
FxHashSet, ensuring that each module is only walked once.

Fixes rust-lang#40936
@Aaron1011 Aaron1011 changed the title Fix rustdoc infinitely recursing when an extneral crate reexports itself Fix rustdoc infinitely recursing when an external crate reexports itself Apr 9, 2017
@alexcrichton alexcrichton added the A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools label Apr 11, 2017
@Mark-Simulacrum
Copy link
Member

Thanks! We'll make sure someone reviews your PR soon! r? @frewsxcv

@frewsxcv frewsxcv assigned GuillaumeGomez and unassigned frewsxcv Apr 14, 2017
@frewsxcv
Copy link
Member

LGTM, look good @GuillaumeGomez ?

@shepmaster shepmaster added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 14, 2017
@GuillaumeGomez
Copy link
Member

Thanks!

@bors: r=frewsxcv

@bors
Copy link
Contributor

bors commented Apr 14, 2017

📌 Commit 63a291f has been approved by frewsxcv

@frewsxcv
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Apr 14, 2017

💡 This pull request was already approved, no need to approve it again.

@bors
Copy link
Contributor

bors commented Apr 14, 2017

📌 Commit 63a291f has been approved by frewsxcv

@frewsxcv frewsxcv 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 Apr 14, 2017
@bors
Copy link
Contributor

bors commented Apr 14, 2017

⌛ Testing commit 63a291f with merge 2411490...

@bors
Copy link
Contributor

bors commented Apr 14, 2017

💔 Test failed - status-appveyor

@frewsxcv
Copy link
Member

@bors retry #40546

frewsxcv added a commit to frewsxcv/rust that referenced this pull request Apr 14, 2017
Fix rustdoc infinitely recursing when an external crate reexports itself

Previously, rustdoc's LibEmbargoVisitor unconditionally visited the
child modules of an external crate. If a module re-exported its parent
via `pub use super::*`, rustdoc would re-walk the parent, leading to
infinite recursion.

This commit makes LibEmbargoVisitor store already visited modules in an
FxHashSet, ensuring that each module is only walked once.

Fixes rust-lang#40936
bors added a commit that referenced this pull request Apr 14, 2017
Rollup of 4 pull requests

- Successful merges: #40702, #41172, #41249, #41303
- Failed merges:
@bors
Copy link
Contributor

bors commented Apr 15, 2017

⌛ Testing commit 63a291f with merge f0ca5d4...

@bors bors merged commit 63a291f into rust-lang:master Apr 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools 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