-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Cleanup refactoring around DefPath handling #38418
Conversation
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.
r=me with comments addressed.
collector.parent_def = Some(def); | ||
|
||
collector | ||
} |
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.
You forgot to remove the hir::intravisit::Visitor
impl.
@@ -936,7 +940,7 @@ pub fn map_crate<'ast>(forest: &'ast mut Forest, | |||
forest: forest, | |||
dep_graph: forest.dep_graph.clone(), | |||
map: RefCell::new(map), | |||
definitions: RefCell::new(definitions), | |||
definitions: definitions, | |||
local_node_id_watermark: local_node_id_watermark, | |||
local_def_id_watermark: local_def_id_watermark, |
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.
You can remove this watermark too btw.
@bors r=eddyb Thanks for the review! |
📌 Commit 77e659a has been approved by |
Travis found an ICE. |
@bors r- |
Something seems to break in rustdoc... |
@bors r=eddyb Re-reviewed. |
📌 Commit 3a82b0d has been approved by |
…r=eddyb Cleanup refactoring around DefPath handling This PR makes two big changes: * All DefPaths of a crate are now stored in metadata in their own table (as opposed to `DefKey`s as part of metadata `Entry`s. * The compiler will no longer allocate a pseudo-local DefId for inlined HIR nodes (because those are gross). Inlined HIR nodes will have a NodeId but they don't have there own DefId anymore. Turns out they were not needed anymore either. Hopefully HIR inlining will be gone completely one day but if until then we start needing to be able to map inlined NodeIds to original DefIds, we can add an additional table to metadata that allows for reconstructing this. Overall this makes for some nice simplifications and removal of special cases. r? @eddyb cc @rust-lang/compiler
Rollup of 29 pull requests - Successful merges: #37761, #38006, #38131, #38150, #38158, #38171, #38208, #38215, #38236, #38245, #38289, #38302, #38315, #38346, #38388, #38395, #38398, #38418, #38432, #38451, #38463, #38468, #38470, #38471, #38472, #38478, #38486, #38493, #38498 - Failed merges: #38271, #38483
This PR makes two big changes:
DefKey
s as part of metadataEntry
s.Overall this makes for some nice simplifications and removal of special cases.
r? @eddyb
cc @rust-lang/compiler