Skip to content

Fix rustdoc not correctly showing attributes on re-exports #143083

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

Merged
merged 1 commit into from
Jul 3, 2025

Conversation

JonathanBrouwer
Copy link
Contributor

Fixes attributes not being shown correctly in rustdoc on re-exports

Does this need to be backported to beta?

r? @jdonszelmann

@rustbot
Copy link
Collaborator

rustbot commented Jun 27, 2025

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

@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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Jun 27, 2025
@JonathanBrouwer JonathanBrouwer changed the title Fix rustdoc not correctly showing attributes with re-exports Fix rustdoc not correctly showing attributes on re-exports Jun 27, 2025
Copy link
Contributor

@lolbinarycat lolbinarycat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe could use a comment on the test, but I think its simple enough to be self-explanatory.

I've looked through AttributeKind and there's nothing there that seems like it should be hidden only when an item is inlined, with the possible exception of doc(inline) itself, although the code suggests that the doc attribute isn't using the new attribute parsing system yet.

@JonathanBrouwer
Copy link
Contributor Author

JonathanBrouwer commented Jun 27, 2025

@lolbinarycat
I've added a comment to the test.

I've matched the fixed behaviour exactly to the old behaviour, which is right above the changed lines.
In the old behaviour, only cfg_trace is excluded. cfg_trace has not been converted to the new attribute parser yet so that's why I put a FIXME in place

@fmease fmease assigned fmease and unassigned jdonszelmann Jun 27, 2025
@lolbinarycat
Copy link
Contributor

In the old behaviour, only cfg_trace is excluded

both doc and cfg_trace have special handling, and both of them will need that special handling ported to the new system when they are ported to the new system, but that's an issue for a future PR.

@jdonszelmann
Copy link
Contributor

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jul 3, 2025

📌 Commit 58418d8 has been approved by jdonszelmann

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 Jul 3, 2025
jdonszelmann added a commit to jdonszelmann/rust that referenced this pull request Jul 3, 2025
…nszelmann

Fix rustdoc not correctly showing attributes on re-exports

Fixes attributes not being shown correctly in rustdoc on re-exports

Does this need to be backported to beta?

r? `@jdonszelmann`
bors added a commit that referenced this pull request Jul 3, 2025
Rollup of 6 pull requests

Successful merges:

 - #134006 (setup typos check in CI)
 - #142876 (Port `#[target_feature]` to new attribute parsing infrastructure)
 - #143038 (avoid suggesting traits from private dependencies)
 - #143083 (Fix rustdoc not correctly showing attributes on re-exports)
 - #143283 (document optional jobs)
 - #143329 (minicore: use core's `diagnostic::on_unimplemented` messages)

Failed merges:

 - #143237 (Port `#[no_implicit_prelude]` to the new attribute parsing infrastructure)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 622722a into rust-lang:master Jul 3, 2025
10 checks passed
@rustbot rustbot added this to the 1.90.0 milestone Jul 3, 2025
rust-timer added a commit that referenced this pull request Jul 3, 2025
Rollup merge of #143083 - JonathanBrouwer:rustdoc-fix, r=jdonszelmann

Fix rustdoc not correctly showing attributes on re-exports

Fixes attributes not being shown correctly in rustdoc on re-exports

Does this need to be backported to beta?

r? ``@jdonszelmann``
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Jul 4, 2025
Rollup of 6 pull requests

Successful merges:

 - rust-lang/rust#134006 (setup typos check in CI)
 - rust-lang/rust#142876 (Port `#[target_feature]` to new attribute parsing infrastructure)
 - rust-lang/rust#143038 (avoid suggesting traits from private dependencies)
 - rust-lang/rust#143083 (Fix rustdoc not correctly showing attributes on re-exports)
 - rust-lang/rust#143283 (document optional jobs)
 - rust-lang/rust#143329 (minicore: use core's `diagnostic::on_unimplemented` messages)

Failed merges:

 - rust-lang/rust#143237 (Port `#[no_implicit_prelude]` to the new attribute parsing infrastructure)

r? `@ghost`
`@rustbot` modify labels: rollup
Kobzol pushed a commit to Kobzol/rustc-dev-guide that referenced this pull request Jul 4, 2025
Rollup of 6 pull requests

Successful merges:

 - rust-lang/rust#134006 (setup typos check in CI)
 - rust-lang/rust#142876 (Port `#[target_feature]` to new attribute parsing infrastructure)
 - rust-lang/rust#143038 (avoid suggesting traits from private dependencies)
 - rust-lang/rust#143083 (Fix rustdoc not correctly showing attributes on re-exports)
 - rust-lang/rust#143283 (document optional jobs)
 - rust-lang/rust#143329 (minicore: use core's `diagnostic::on_unimplemented` messages)

Failed merges:

 - rust-lang/rust#143237 (Port `#[no_implicit_prelude]` to the new attribute parsing infrastructure)

r? `@ghost`
`@rustbot` modify labels: rollup
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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants