Skip to content

Conversation

GuillaumeGomez
Copy link
Member

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

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Oct 17, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 17, 2025

fmease is currently at their maximum review capacity.
They may take a while to respond.

@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez
Copy link
Member Author

CI passed. ^^'

@GuillaumeGomez
Copy link
Member Author

Thanks for the quick review!

@bors r=fmease rollup

@bors
Copy link
Collaborator

bors commented Oct 17, 2025

📌 Commit b3bb750 has been approved by fmease

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 17, 2025
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`
ConditionalPass::new(STRIP_PRIVATE, WhenNotDocumentPrivate),
ConditionalPass::new(STRIP_PRIV_IMPORTS, WhenDocumentPrivate),
ConditionalPass::always(COLLECT_INTRA_DOC_LINKS),
ConditionalPass::always(PROPAGATE_DOC_CFG),
Copy link
Member

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 ^^'

Copy link
Member

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

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
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 18, 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``
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants