rust/compiler/rustc_mir_transform/src/coverage
bors 0f573a0c54 Auto merge of #95573 - cjgillot:lower-query, r=michaelwoerister
Make lowering a query

Split from https://github.com/rust-lang/rust/pull/88186.

This PR refactors the relationship between lowering and the resolver outputs in order to make lowering itself a query.
In a first part, lowering is changed to avoid modifying resolver outputs, by maintaining its own data structures for creating new `NodeId`s and so.

Then, the `TyCtxt` is modified to allow creating new `LocalDefId`s from inside it. This is done by:
- enclosing `Definitions` in a lock, so as to allow modification;
- creating a query `register_def` whose purpose is to declare a `LocalDefId` to the query system.

See `TyCtxt::create_def` and `TyCtxt::iter_local_def_id` for more detailed explanations of the design.
2022-07-07 18:14:44 +00:00
..
test_macros Migrate to 2021 2021-09-20 22:21:42 -04:00
counters.rs Replace &Vec<_>s with &[_]s 2022-06-03 20:42:42 +04:00
debug.rs Move/rename lazy::Sync{OnceCell,Lazy} to sync::{Once,Lazy}Lock 2022-06-16 19:54:42 +04:00
graph.rs Move predecessors from Body to BasicBlocks 2022-07-07 08:11:49 +02:00
mod.rs Allow to create definitions inside the query system. 2022-07-06 22:50:55 +02:00
query.rs Spellchecking compiler comments 2022-03-30 15:14:15 -04:00
spans.rs Make MIR basic blocks field public 2022-07-07 08:11:49 +02:00
tests.rs Make MIR basic blocks field public 2022-07-07 08:11:49 +02:00