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: Consider adding CCI for the HIR expressions of public constants #132443

Open
camelid opened this issue Nov 1, 2024 · 0 comments
Open
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@camelid
Copy link
Member

camelid commented Nov 1, 2024

When a constant is inlined into another crate, we are forced to always show the evaluated/folded version of the constant. This is because we don't have access to the original HIR in the metadata.

This could be a situation where we can use (rust-lang/rfcs#3662) to store the original expression for public constants (that could potentially be inlined by other crates) so that we don't have the cross-crate issue. Might be applicable to other cross-crate inconsistencies too (though hopefully the type alias one will be resolved by lazy_type_alias).

Adapted from a post by @camelid in #131975 (comment)

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Nov 1, 2024
@camelid camelid added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. C-enhancement Category: An issue proposing an enhancement or a PR with one. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Nov 1, 2024
@camelid camelid changed the title rustdoc: Consider adding CCI for the HIR expressions of public constans rustdoc: Consider adding CCI for the HIR expressions of public constants Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

2 participants