-
Notifications
You must be signed in to change notification settings - Fork 225
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
fix: Differentiate stdlib CrateId
from others
#1895
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TomAFrench
reviewed
Jul 8, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice to break out the stdlib more explicitly. Not sure we need to pass around the root crate id however.
TomAFrench
changed the title
fix: Differentiate stdlib CrateId from others
fix: Differentiate stdlib Jul 10, 2023
CrateId
from others
jfecher
reviewed
Jul 10, 2023
feat: Drop LOCAL_CRATE constant
phated
force-pushed
the
phated/remove-local-crate
branch
from
July 17, 2023 18:42
f8ceba7
to
a986162
Compare
TomAFrench
previously approved these changes
Jul 17, 2023
TomAFrench
approved these changes
Jul 18, 2023
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Problem*
Resolves #1894
Towards #1838
Summary*
This removes the concept of
LOCAL_CRATE
being a fixedCrateId(0)
and instead uses the crate id generated by adding a crate to the graph. The only place where hardcoding the value was useful was checking forimpl
on primitive values; however, as noted in #1894, this was a bad solution and the stdlib should be a special case ofCrateId
so it has become an enum and solves that bug.Documentation
This PR requires documentation updates when merged.
Additional Context
PR Checklist*
cargo fmt
on default settings.