Skip to content
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

rustdoc: Compute visibility on-demand, using ty::Visibility #90852

Closed
camelid opened this issue Nov 13, 2021 · 0 comments · Fixed by #103935
Closed

rustdoc: Compute visibility on-demand, using ty::Visibility #90852

camelid opened this issue Nov 13, 2021 · 0 comments · Fixed by #103935
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate. I-compilemem Issue: Problems and improvements with respect to memory usage during compilation. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@camelid
Copy link
Member

camelid commented Nov 13, 2021

Currently, rustdoc computes visibility ahead of time and stores it in Item.visibility. rustdoc also has its own visibility representation: clean::Visibility.

Instead, rustdoc should just use ty::Visibility directly, and compute it on-demand using an Item::visibility() function.

@camelid camelid added C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate. I-compilemem Issue: Problems and improvements with respect to memory usage during compilation. labels Nov 13, 2021
@camelid camelid self-assigned this Nov 19, 2021
bors added a commit to rust-lang-ci/rust that referenced this issue Nov 2, 2022
… r=notriddle

Make rustdoc Item::visibility computed on-demand

This is a take-over of rust-lang#91408.

Helps with rust-lang#90852 (needs to use `ty::Visibility` directly too).

cc `@camelid`
r? `@notriddle`
@bors bors closed this as completed in c6e5150 Nov 4, 2022
RalfJung pushed a commit to RalfJung/miri that referenced this issue Nov 5, 2022
Make rustdoc Item::visibility computed on-demand

This is a take-over of rust-lang/rust#91408.

Helps with rust-lang/rust#90852 (needs to use `ty::Visibility` directly too).

cc `@camelid`
r? `@notriddle`
RalfJung pushed a commit to RalfJung/rust-analyzer that referenced this issue Apr 20, 2024
Make rustdoc Item::visibility computed on-demand

This is a take-over of rust-lang/rust#91408.

Helps with rust-lang/rust#90852 (needs to use `ty::Visibility` directly too).

cc `@camelid`
r? `@notriddle`
RalfJung pushed a commit to RalfJung/rust-analyzer that referenced this issue Apr 27, 2024
Make rustdoc Item::visibility computed on-demand

This is a take-over of rust-lang/rust#91408.

Helps with rust-lang/rust#90852 (needs to use `ty::Visibility` directly too).

cc `@camelid`
r? `@notriddle`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate. I-compilemem Issue: Problems and improvements with respect to memory usage during compilation. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant