Skip to content

Default implementation of CrateNum encoding/decoding should be disabled #86540

Open
@michaelwoerister

Description

@michaelwoerister

The default implementation for CrateNum encoding and decoding should be disabled because the numeric value of a CrateNum can only be meaningfully interpreted giving the specific context of decoding (which the default decoder does not have access to). We already do something similar for DefIndex because it helps prevent bugs where decoding seems to work but really provides wrong values.

I already tried to make this change as part of #86368 (see 3eaeb92) but it turns out there's still one user of the default implementation related to -Zno-link.

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