Skip to content

Use a different DefId for the Def::Variant and Def::VariantCtor #59131

Closed
@dlrobertson

Description

@dlrobertson

The enum variant (Dev::Variant) and the enum variants constructor (Def::VariantCtor) share the same DefId making it impossible for tcx.describe_def to resolve a DefId to a VariantCtor.

This issue originates from the discussion here.

Note: tcx.describe_def has not moved away from NodeId. It may be best for the fix to wait until it is.
CC: #59036

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-cleanupCategory: PRs that clean code up or issues documenting cleanup.T-compilerRelevant to the compiler 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