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 DefIds.
Pro: simplicity.
Cons:
- non-panicking versions of some queries need to be created;
- more queries are forced even if not data is expected from them.
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:
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.
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
DefIds.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 mergeon 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.