-
Notifications
You must be signed in to change notification settings - Fork 13.9k
rustdoc: Fix passes order so intra-doc links are collected after stripping passes #147809
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
base: master
Are you sure you want to change the base?
rustdoc: Fix passes order so intra-doc links are collected after stripping passes #147809
Conversation
|
This comment has been minimized.
This comment has been minimized.
a0c8a00
to
b3bb750
Compare
CI passed. ^^' |
Thanks for the quick review! @bors r=fmease rollup |
… r=fmease rustdoc: Fix passes order so intra-doc links are collected after stripping passes Fixes regression I introduced in rust-lang#147153. This PR puts back the intra-doc link collecting pass after the stripping items pass, preventing lints to be emitted on non-visible items. Although, might be nice to add a way to change this behaviour. To be discussed later on. cc `@ojeda` r? `@fmease`
ConditionalPass::new(STRIP_PRIVATE, WhenNotDocumentPrivate), | ||
ConditionalPass::new(STRIP_PRIV_IMPORTS, WhenDocumentPrivate), | ||
ConditionalPass::always(COLLECT_INTRA_DOC_LINKS), | ||
ConditionalPass::always(PROPAGATE_DOC_CFG), |
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.
Now, could you move the PROPAGATE_DOC_CFG
pass somewhere above the STRIP_*
ones to address #138907 (comment) and revert the change to tests/rustdoc-ui/invalid-cfg.rs
you made in #138907 (i.e., make it private again and add an explanation) or do you want to do it in another PR?
My open PR #146529 is kinda blocked cuz I wanted to wait for all of these fixes ^^'
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.
Discussed elsewhere, it's gonna be done in a separate PR
… r=fmease rustdoc: Fix passes order so intra-doc links are collected after stripping passes Fixes regression I introduced in rust-lang#147153. This PR puts back the intra-doc link collecting pass after the stripping items pass, preventing lints to be emitted on non-visible items. Although, might be nice to add a way to change this behaviour. To be discussed later on. cc `@ojeda` r? `@fmease`
Rollup of 7 pull requests Successful merges: - #140153 (Implement `Debug` for `EncodeWide`) - #147454 (Fix backtraces with `-C panic=abort` on qnx; emit unwind tables by default) - #147468 (Implement fs api set_times and set_times_nofollow) - #147494 (std::thread spawn: Docs: Link to Builder::spawn; Make same.) - #147783 (bootstrap: migrate to object 0.37) - #147792 (Fix autodiff incorrectly applying fat-lto to proc-macro crates ) - #147809 (rustdoc: Fix passes order so intra-doc links are collected after stripping passes) r? `@ghost` `@rustbot` modify labels: rollup
Fixes regression I introduced in #147153.
This PR puts back the intra-doc link collecting pass after the stripping items pass, preventing lints to be emitted on non-visible items.
Although, might be nice to add a way to change this behaviour. To be discussed later on.
cc @ojeda
r? @fmease