Skip to content

rustdoc: Make some attributes methods private. #142739

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

Closed
wants to merge 1 commit into from

Conversation

aDotInTheVoid
Copy link
Member

Followup to #140863

Only Item::attributes_and_repr should be used, the rest are implementation details that can be hidden from the rest of rustdoc.

r? @GuillaumeGomez

Followup to https://www.github.com/rust-lang/rust/pull/140863

Only `Item::attributes_and_repr` should be used, the rest are
implementation details that can be hidden from the rest of rustdoc.
@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 Jun 19, 2025
@@ -764,7 +764,7 @@ impl Item {
Some(tcx.visibility(def_id))
}

pub(crate) fn attributes_without_repr(&self, tcx: TyCtxt<'_>, is_json: bool) -> Vec<String> {
fn attributes_without_repr(&self, tcx: TyCtxt<'_>, is_json: bool) -> Vec<String> {
Copy link
Member

@fmease fmease Jun 19, 2025

Choose a reason for hiding this comment

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

This one is actually only called by attributes_with_repr IIRC. In #116882 I actually inline this method and rename atrributes_with_repr to attributes because repr is an attribute and since the relevant bit of Guillaume's ADT / type alias unification PR is the fact that we now have a standalone fn repr_attributes

@aDotInTheVoid
Copy link
Member Author

Given that #116882 also makes these changes, I think I'll close this in favor of that, so we don't get needless merge conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants