rustdoc: Fix passes order so intra-doc links are collected after stripping passes#147809
Merged
bors merged 2 commits intorust-lang:masterfrom Oct 18, 2025
Merged
rustdoc: Fix passes order so intra-doc links are collected after stripping passes#147809bors merged 2 commits intorust-lang:masterfrom
bors merged 2 commits intorust-lang:masterfrom
Conversation
Collaborator
|
|
26 tasks
This comment has been minimized.
This comment has been minimized.
a0c8a00 to
b3bb750
Compare
Member
Author
|
CI passed. ^^' |
fmease
approved these changes
Oct 17, 2025
Member
Author
|
Thanks for the quick review! @bors r=fmease rollup |
Collaborator
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this pull request
Oct 17, 2025
… 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`
fmease
reviewed
Oct 17, 2025
| ConditionalPass::new(STRIP_PRIVATE, WhenNotDocumentPrivate), | ||
| ConditionalPass::new(STRIP_PRIV_IMPORTS, WhenDocumentPrivate), | ||
| ConditionalPass::always(COLLECT_INTRA_DOC_LINKS), | ||
| ConditionalPass::always(PROPAGATE_DOC_CFG), |
Member
There was a problem hiding this comment.
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 ^^'
Member
There was a problem hiding this comment.
Discussed elsewhere, it's gonna be done in a separate PR
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this pull request
Oct 17, 2025
… 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`
bors
added a commit
that referenced
this pull request
Oct 17, 2025
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
bors
added a commit
that referenced
this pull request
Oct 18, 2025
Rollup of 6 pull requests Successful merges: - #146509 (Result/Option layout guarantee clarifications) - #147494 (std::thread spawn: Docs: Link to Builder::spawn; Make same.) - #147532 ( Port `#[cfg_attr]` to the new attribute parsing infrastructure) - #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) Failed merges: - #147813 (Warn on unused_attributes in uitests ) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
that referenced
this pull request
Oct 18, 2025
Rollup merge of #147809 - GuillaumeGomez:fix-rustdoc-passes, r=fmease rustdoc: Fix passes order so intra-doc links are collected after stripping passes 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``
ojeda
pushed a commit
to Rust-for-Linux/linux
that referenced
this pull request
Nov 19, 2025
Rust 1.92.0 warns when building the documentation that [`PinnedDrop`] is
an invalid reference. This is correct and it's weird that it didn't warn
before, so fix the link.
[ The reason is that it is hidden -- I had asked about that in the
upstream PR that changed the behavior because I wasn't sure it was
intentional (and thus whether we needed to fix this and other cases):
rust-lang/rust#147153 (comment)
It turns out it was not, and it has been fixed for 1.92.0's upcoming
release thanks to Guillaume and León. So we do not strictly need
this patch and the other changes anymore:
rust-lang/rust#147809
However, checking hidden/private items or, even better, a runtime
toggle to be able to see those on the fly, is something that I think
would be quite nice so I have had it in our usual lists for a while.
Guillaume is open to the idea and perhaps experimenting with an
implementation on our side first -- he asked me to open issues
upstream:
rust-lang/rust#149105
rust-lang/rust#149106
- Miguel ]
Signed-off-by: Benno Lossin <lossin@kernel.org>
Link: https://patch.msgid.link/20251016211740.653599-1-lossin@kernel.org
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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