-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
rustdoc: general cleanups #62955
rustdoc: general cleanups #62955
Conversation
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
ef4c04e
to
dca3e43
Compare
@QuietMisdreavus Howdy from triage! This PR has sat waiting for review for a week. Can you please have a look? |
☔ The latest upstream changes (presumably #63180) made this pull request unmergeable. Please resolve the merge conflicts. |
src/librustdoc/clean/mod.rs
Outdated
// The `()` here is rather ugly and would be great to remove. Unfortunately, we | ||
// already have a different Clean impl for `doctree::Module` which makes this | ||
// the only way to easily disambiguate. | ||
impl<'tcx> Clean<Crate> for ((), doctree::Module<'tcx>) { |
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.
Implement this on &'tcx hir::Crate
instead and have it create RustdocVisitor
here.
@@ -23,8 +23,7 @@ pub struct Module<'hir> { | |||
pub enums: Vec<Enum<'hir>>, | |||
pub fns: Vec<Function<'hir>>, | |||
pub mods: Vec<Module<'hir>>, | |||
pub id: NodeId, | |||
pub hid: hir::HirId, | |||
pub id: hir::HirId, |
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.
Ideally, this entire module would use DefId
, but this is an improvement.
r? @eddyb r=me after rebase and maybe @petrochenkov can take a look at the resolver changes |
dca3e43
to
f0c3563
Compare
Rebased and fixed the review comments. I can try and replace everything with |
Previously visit could be called multiple times, but this is inaccurate, as it deconstructs Visitor state.
Also privatizes needlessly public methods to enforce which methods callers are intended to call, i.e., only `new` and `visit`.
f0c3563
to
32f144a
Compare
@bors r=eddyb |
📌 Commit 32f144a has been approved by |
rustdoc: general cleanups This is purely a refactoring, mostly just simplifying some of the code. Commits are best reviewed individually.
☀️ Test successful - checks-azure |
This is purely a refactoring, mostly just simplifying some of the code. Commits are best reviewed individually.