Do not traverse the HIR to generate metadata #392
Labels
major-change
A proposal to make a major change to rustc
T-compiler
Add this label so rfcbot knows to poll the compiler team
Proposal
At the moment, generating metadata (rmeta files) traverses the HIR
and gathers relevant data independently for each node.
Most of this data corresponds to the output of
DefId
-keyed queries,and is meant to provide info for the same queries in downstream crates.
We propose to replace the traversal of the HIR by a simple loop on all the local
DefId
s.Pro: simplicity.
Cons:
List of affected queries: def_span, visibility, attributes, expn_that_defined, variances_of, type_of, stability, const_stability, deprecation, generics_of, explicit_predicates, inferred_outlives, promoted_mir, optimized_mir, fn_sig, explicit_item_bounds, inherent_impls.
Draft PR at rust-lang/rust#80347
Mentors or Reviewers
MCP requested by @oli-obk
Process
The main points of the Major Change Process is as follows:
@rustbot second
.-C flag
, then full team check-off is required.@rfcbot fcp merge
on either the MCP or the PR.You can read more about Major Change Proposals on forge.
Comments
This issue is not meant to be used for technical discussion. There is a Zulip stream for that. Use this issue to leave procedural comments, such as volunteering to review, indicating that you second the proposal (or third, etc), or raising a concern that you would like to be addressed.
The text was updated successfully, but these errors were encountered: