rust/compiler
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
..
rustc Rollup merge of #97385 - oli-obk:smir-tool-lib, r=pnkfelix 2022-06-14 07:47:24 +09:00
rustc_apfloat Update smallvec to 1.8.1. 2022-06-27 08:48:55 +10:00
rustc_arena Rollup merge of #97711 - Nilstrieb:rustc-arena-ub, r=wesleywiser 2022-07-07 18:06:49 +05:30
rustc_ast ast: Add span to Extern 2022-07-02 23:30:03 +01:00
rustc_ast_lowering Auto merge of #95573 - cjgillot:lower-query, r=michaelwoerister 2022-07-07 18:14:44 +00:00
rustc_ast_passes Suggest using block for extern "abi" fn with no body 2022-07-06 13:27:53 +01:00
rustc_ast_pretty ast: Add span to Extern 2022-07-02 23:30:03 +01:00
rustc_attr Remove rustc_deprecated diagnostics 2022-06-14 19:46:13 -04:00
rustc_borrowck Move dominators from Body to BasicBlocks 2022-07-07 08:11:49 +02:00
rustc_builtin_macros Don't use match-destructuring for derived ops on structs. 2022-07-04 10:48:15 +10:00
rustc_codegen_cranelift incr: cache dwarf objects in work products 2022-07-06 11:15:13 +01:00
rustc_codegen_gcc Update TypeVisitor paths 2022-07-06 06:41:53 +01:00
rustc_codegen_llvm Allow to create definitions inside the query system. 2022-07-06 22:50:55 +02:00
rustc_codegen_ssa Auto merge of #95573 - cjgillot:lower-query, r=michaelwoerister 2022-07-07 18:14:44 +00:00
rustc_const_eval Rollup merge of #98930 - tmiasko:pub-basic-blocks, r=oli-obk 2022-07-07 18:06:53 +05:30
rustc_data_structures Allow to create definitions inside the query system. 2022-07-06 22:50:55 +02:00
rustc_driver Fix bug in rustdoc -Whelp 2022-07-02 02:11:49 -05:00
rustc_error_codes Rollup merge of #97423 - m-ou-se:memory-ordering-intrinsics, r=tmiasko 2022-06-29 10:28:18 +05:30
rustc_error_messages lint: port asm labels diagnostics 2022-06-30 08:59:22 +01:00
rustc_errors errors: introduce DecorateLint 2022-07-05 16:00:20 +01:00
rustc_expand Auto merge of #98446 - nnethercote:derive-no-match-destructuring, r=scottmcm 2022-07-04 01:06:54 +00:00
rustc_feature Move/rename lazy::Sync{OnceCell,Lazy} to sync::{Once,Lazy}Lock 2022-06-16 19:54:42 +04:00
rustc_fs_util Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_graphviz Fully stabilize NLL 2022-06-03 17:16:41 -04:00
rustc_hir Make AST lowering a query. 2022-07-06 23:04:55 +02:00
rustc_hir_pretty clean up the borrowing in rustc_hir_pretty 2022-07-03 18:51:14 +02:00
rustc_incremental incr: cache dwarf objects in work products 2022-07-06 11:15:13 +01:00
rustc_index Use a bitset instead of a hash map in HIR ID validator 2022-07-04 08:30:13 +02:00
rustc_infer replace guess_head_span with def_span 2022-07-06 19:09:47 +09:00
rustc_interface Make AST lowering a query. 2022-07-06 23:04:55 +02:00
rustc_lexer fix typo in comment 2022-06-28 19:59:09 +05:30
rustc_lint Auto merge of #95573 - cjgillot:lower-query, r=michaelwoerister 2022-07-07 18:14:44 +00:00
rustc_lint_defs Rollup merge of #98507 - xFrednet:rfc-2383-manual-expectation-magic, r=wesleywiser 2022-07-07 18:06:50 +05:30
rustc_llvm llvm-wrapper: adapt for LLVMConstExtractValue removal 2022-06-30 12:47:34 +00:00
rustc_log clippy::complexity fixes 2022-05-26 13:14:24 +02:00
rustc_macros Rollup merge of #98884 - davidtwco:translation-on-lints-derive, r=oli-obk 2022-07-06 14:49:10 +05:30
rustc_metadata Allow to create definitions inside the query system. 2022-07-06 22:50:55 +02:00
rustc_middle Auto merge of #95573 - cjgillot:lower-query, r=michaelwoerister 2022-07-07 18:14:44 +00:00
rustc_mir_build Make MIR basic blocks field public 2022-07-07 08:11:49 +02:00
rustc_mir_dataflow Rollup merge of #98981 - pierwill:pierwill/dataflow-docs-edits, r=Dylan-DPC 2022-07-07 18:06:55 +05:30
rustc_mir_transform Auto merge of #95573 - cjgillot:lower-query, r=michaelwoerister 2022-07-07 18:14:44 +00:00
rustc_monomorphize Update TypeVisitor paths 2022-07-06 06:41:53 +01:00
rustc_parse Auto merge of #98827 - aDotInTheVoid:suggest-extern-block, r=nagisa 2022-07-07 04:18:47 +00:00
rustc_parse_format Make rustc_parse_format compile on stable 2022-05-03 11:26:58 +02:00
rustc_passes Auto merge of #98841 - Kobzol:hir-validator-bitset, r=cjgillot 2022-07-07 07:38:08 +00:00
rustc_plugin_impl remove currently unused deps 2022-06-13 22:20:51 +03:00
rustc_privacy Rollup merge of #98881 - cjgillot:q-def-kind, r=fee1-dead 2022-07-06 14:49:08 +05:30
rustc_query_impl Use a dedicated DepKind for the forever-red node. 2022-07-06 23:20:12 +02:00
rustc_query_system Auto merge of #95573 - cjgillot:lower-query, r=michaelwoerister 2022-07-07 18:14:44 +00:00
rustc_resolve Auto merge of #98959 - cjgillot:late-bound-order, r=michaelwoerister 2022-07-06 17:38:48 +00:00
rustc_save_analysis Factor out hir::Node::Binding 2022-07-01 10:04:19 -05:00
rustc_serialize Update smallvec to 1.8.1. 2022-06-27 08:48:55 +10:00
rustc_session incr.comp.: Make split-dwarf commandline options [TRACKED]. 2022-07-04 14:11:28 +02:00
rustc_smir Rustfmt 2022-06-02 10:29:00 +00:00
rustc_span errors: introduce DecorateLint 2022-07-05 16:00:20 +01:00
rustc_symbol_mangling Allow to create definitions inside the query system. 2022-07-06 22:50:55 +02:00
rustc_target rustc_target: Some more tests and fixes for linker arguments 2022-06-25 21:57:08 +03:00
rustc_trait_selection Rollup merge of #98519 - TaKO8Ki:add-head-span-field-to-item-and-impl-item, r=cjgillot 2022-07-06 20:43:24 +02:00
rustc_traits Update TypeVisitor paths 2022-07-06 06:41:53 +01:00
rustc_ty_utils Update TypeVisitor paths 2022-07-06 06:41:53 +01:00
rustc_type_ir more rustc_pass_by_value 2022-07-04 09:40:58 +02:00
rustc_typeck Auto merge of #98487 - cjgillot:variance-nohir, r=wesleywiser 2022-07-07 01:17:36 +00:00