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

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

Open
michaelwoerister opened this issue Jun 22, 2021 · 0 comments
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@michaelwoerister
Copy link
Member

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.

@michaelwoerister michaelwoerister added C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 22, 2021
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. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

1 participant