-
Notifications
You must be signed in to change notification settings - Fork 13.8k
[rustdoc] Move doc cfg propagation pass before items stripping passes #147153
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] Move doc cfg propagation pass before items stripping passes #147153
Conversation
This comment has been minimized.
This comment has been minimized.
9157004
to
a5068f7
Compare
This comment has been minimized.
This comment has been minimized.
a5068f7
to
9119eba
Compare
This just made me realize that the way we print feature dependency info is often pretty bad. I originally read "Available on non-crate feature blob only" as referring to a "non-crate feature" (whatever that would mean) named "blob". Anyways, that's an unrelated (and non-trivial) issue that should be addressed in a separate PR. @bors r+ rollup |
Rollup of 4 pull requests Successful merges: - #145883 (Make macOS dist build configuration match where reasonable) - #146457 (Skip cleanups on unsupported targets) - #147152 (builtin `Fn`-trait impls: instantiate binder before the return type `Sized` check) - #147153 ([rustdoc] Move doc cfg propagation pass before items stripping passes) r? `@ghost` `@rustbot` modify labels: rollup
I think this one implies that now intra-doc links are now checked in That is nice, since intra-doc links could be useful even if not rendered (e.g. for source view, IDEs, etc., plus to detect typos or if the docs get copied to public items, etc.), but I wanted to confirm whether that is expected behavior (because I need to clean up a couple cases in the kernel), and if so, whether we should add a test here on Thanks! |
ConditionalPass::new(STRIP_HIDDEN, WhenNotDocumentHidden), | ||
ConditionalPass::new(STRIP_PRIVATE, WhenNotDocumentPrivate), | ||
ConditionalPass::new(STRIP_PRIV_IMPORTS, WhenDocumentPrivate), | ||
ConditionalPass::always(COLLECT_INTRA_DOC_LINKS), |
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.
Revisiting thus due to ojeda's comment. Moving the intra-doc link pass before the strippers seems very much like a mistake.
I believe this PR was a response to my review comment #138907 (comment) in which I requested to move the doc cfg propagation pass before the strippers.
I haven't tried it out yet but that review comment wasn't properly addressed then.
(You did also change the ordering in PASSES
but that's only used in diagnostics IIRC)
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.
Did the added test also work before this PR?
Follow-up of #138907.
r? lolbinarycat