rust/compiler/rustc_ast_lowering/src
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
..
asm.rs Remove sess field from LoweringContext. 2022-07-06 23:15:57 +02:00
block.rs Remove sess field from LoweringContext. 2022-07-06 23:15:57 +02:00
expr.rs Remove sess field from LoweringContext. 2022-07-06 23:15:57 +02:00
index.rs Factor out hir::Node::Binding 2022-07-01 10:04:19 -05:00
item.rs Auto merge of #95573 - cjgillot:lower-query, r=michaelwoerister 2022-07-07 18:14:44 +00:00
lib.rs Remove sess field from LoweringContext. 2022-07-06 23:15:57 +02:00
pat.rs Make ResolverAstLowering a struct. 2022-06-14 22:44:27 +02:00
path.rs Remove sess field from LoweringContext. 2022-07-06 23:15:57 +02:00