Description
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:
- 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:
- File an issue describing the proposal.
- A compiler team member or contributor who is knowledgeable in the area can second by writing
@rustbot second
.- Finding a "second" suffices for internal changes. If however you are proposing a new public-facing feature, such as a
-C flag
, then full team check-off is required. - Compiler team members can initiate a check-off via
@rfcbot fcp merge
on either the MCP or the PR.
- Finding a "second" suffices for internal changes. If however you are proposing a new public-facing feature, such as a
- Once an MCP is seconded, the Final Comment Period begins. If no objections are raised after 10 days, the MCP is considered approved.
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.