Turn crate store into a resolver output#65625
Merged
bors merged 10 commits intorust-lang:masterfrom Oct 25, 2019
Merged
Conversation
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.
Crate store (
CStore) is a vector of data (CrateMetadata) associated with extern crates loaded during the current compilation session.All crates are loaded in the resolver when resolving either paths pointing to extern prelude or
extern crateitems. (There are also a couple of crates like panic runtime that are loaded kind of like implicitextern crates, but that also happens in resolve.)The use of
CStorefromrustc_plugin(which is outside of the resolver) was unnecessary because legacy plugins are not added to the crate store and don't useCrateNums.So,
CStorecan be produced by the resolver instead of being kept in some really global data (rustc_interface::Compiler) like now.As a result of crate store being more "local" we can now remove some locks and
Lrcs.