Skip to content

rustdoc: Fix missing enum variant reexports #42608

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
Jun 13, 2017

Conversation

ollie27
Copy link
Member

@ollie27 ollie27 commented Jun 12, 2017

Fixes #35488

@rust-highfive
Copy link
Contributor

r? @steveklabnik

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

}
}
hir::ItemEnum(..) => {}
_ => { panic!("glob not mapped to a module or enum"); }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It took me a couple reads to understand what was going on here, but just to straighten out my understanding: Reworking the match like this means that glob imports of enums will never be inlined, making them always appear as pub use SomeEnum::*;, whereas before they would be treated as they were inlined, but the variants would never be visited, leaving them completely undocumented? I haven't worked much with the AST crawling portion of rustdoc, but looking at the comments at the head of the function and the other change in clean/inline.rs, that's the impression I get from this change.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's correct. In most cases already reexported enum variant appear as pub use SomeEnum::*; or pub use SomeEnum::Foo;, this PR fixes a couple of specific cases when they don't.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool. I see you pushed an update, but r=me pending travis.

@ollie27 ollie27 force-pushed the rustdoc_variant_reexport branch from 1c73827 to 68ccba8 Compare June 12, 2017 21:43
@QuietMisdreavus
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Jun 12, 2017

📌 Commit 68ccba8 has been approved by QuietMisdreavus

@bors
Copy link
Collaborator

bors commented Jun 13, 2017

⌛ Testing commit 68ccba8 with merge 9adf969...

bors added a commit that referenced this pull request Jun 13, 2017
…eavus

rustdoc: Fix missing enum variant reexports

Fixes #35488
@bors
Copy link
Collaborator

bors commented Jun 13, 2017

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

@bors bors merged commit 68ccba8 into rust-lang:master Jun 13, 2017
@ollie27 ollie27 deleted the rustdoc_variant_reexport branch June 13, 2017 11:25
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

Successfully merging this pull request may close these issues.

5 participants