-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
} | ||
} | ||
hir::ItemEnum(..) => {} | ||
_ => { panic!("glob not mapped to a module or enum"); } |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
1c73827
to
68ccba8
Compare
@bors r+ |
📌 Commit 68ccba8 has been approved by |
…eavus rustdoc: Fix missing enum variant reexports Fixes #35488
☀️ Test successful - status-appveyor, status-travis |
Fixes #35488