Skip to content

rustdoc: Consider adding CCI for the HIR expressions of public constants #132443

Open
@camelid

Description

@camelid

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: An issue proposing an enhancement or a PR with one.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions