Skip to content

rustdoc: Strip imports of items which are #[doc(hidden)] #106538

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
Jan 7, 2023

Conversation

aDotInTheVoid
Copy link
Member

Closes #106379

@rustbot
Copy link
Collaborator

rustbot commented Jan 6, 2023

r? @notriddle

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added A-rustdoc-json Area: Rustdoc JSON backend 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 Jan 6, 2023
@rustbot
Copy link
Collaborator

rustbot commented Jan 6, 2023

Some changes occurred in src/librustdoc/clean/types.rs

cc @camelid

@rust-log-analyzer

This comment has been minimized.

pub(crate) fn imported_item_is_doc_hidden(&self, tcx: TyCtxt<'_>) -> bool {
match self.source.did {
Some(did) => tcx
.get_attrs(did, sym::doc)
Copy link
Member Author

Choose a reason for hiding this comment

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

For some reason that I'm not sure of, using .lists here instead of open coding it causes panics. #106538 (comment)

I think it's to do with the difference between tcx.item_attrs and tcx.get_attrs, as this was the diff that fixed it.

@notriddle
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Jan 7, 2023

📌 Commit ff46d11 has been approved by notriddle

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 Jan 7, 2023
@bors
Copy link
Collaborator

bors commented Jan 7, 2023

⌛ Testing commit ff46d11 with merge 93bf84c...

@bors
Copy link
Collaborator

bors commented Jan 7, 2023

☀️ Test successful - checks-actions
Approved by: notriddle
Pushing 93bf84c to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 7, 2023
@bors bors merged commit 93bf84c into rust-lang:master Jan 7, 2023
@rustbot rustbot added this to the 1.68.0 milestone Jan 7, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (93bf84c): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.5% [-2.5%, -2.5%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.5% [-2.5%, -2.5%] 2

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.1% [1.1%, 1.1%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-json Area: Rustdoc JSON backend merged-by-bors This PR was explicitly merged by bors. 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.

Rustdoc JSON Produces dangling ID's when pub useing #[doc(hidden)] items.
6 participants