rust/compiler
Guillaume Gomez def6393a8b
Rollup merge of #86123 - Aaron1011:query-span, r=cjgillot
Preserve more spans in internal `rustc_queries!` macro

We now preserve the span of the various query modifiers, and
use the span of the query's name for the commas that we
generate to separate the modifiers. This makes debugging issues with the
internal query macro infrastructure much nicer - previously, we
would get errors messages pointing at the entire call site
(the `rustc_queries!` invocation), which isn't very useful.

This should have no effect when compilation succeeds.

A concrete example of an error message produced after this changed:

```
error: local ambiguity: multiple parsing options: built-in NTs tt ('modifiers') or 1 other option.
    --> /home/aaron/repos/rust/compiler/rustc_middle/src/query/mod.rs:23:11
     |
12   | / rustc_queries! {
13   | |     query trigger_delay_span_bug(key: DefId) -> () {
14   | |         desc { "trigger a delay span bug" }
15   | |     }
...    |
23   | |     query hir_crate(key: ()) -> &'tcx Crate<'tcx> {
     | |           ^^^^^^^^^
...    |
1715 | |     }
1716 | | }
     | |_- in this expansion of `rustc_query_append!`
     |
    ::: compiler/rustc_query_impl/src/lib.rs:51:1
     |
51   |   rustc_query_append! { [define_queries!][<'tcx>] }
     |   ------------------------------------------------- in this macro invocation
```

The particular bug shown in this error message will be fixed
in a separate PR.
2021-08-19 19:30:04 +02:00
..
rustc
rustc_apfloat
rustc_arena
rustc_ast Remove box syntax from rustc_ast 2021-08-18 09:25:26 +02:00
rustc_ast_lowering Introduce hir::ExprKind::Let - Take 2 2021-08-15 16:18:26 -03:00
rustc_ast_passes Auto merge of #86860 - fee1-dead:stabilize, r=LeSeulArtichaut 2021-08-18 01:00:17 +00:00
rustc_ast_pretty Introduce hir::ExprKind::Let - Take 2 2021-08-15 16:18:26 -03:00
rustc_attr
rustc_builtin_macros Remove box syntax from rustc_builtin_macros 2021-08-18 09:25:26 +02:00
rustc_codegen_cranelift remove box_syntax uses from cranelift and tools 2021-08-18 09:31:51 +02:00
rustc_codegen_llvm Include (potentially remapped) working dir in crate hash 2021-08-15 15:17:37 -05:00
rustc_codegen_ssa Replace #[plugin_registrar] with exporting __rustc_plugin_registrar 2021-08-10 14:20:48 +02:00
rustc_data_structures Remove duplicate trait bounds in rustc_data_structures::graph 2021-08-09 08:52:04 -05:00
rustc_driver Reduce verbosity of RUSTC_LOG 2021-08-09 21:39:39 -04:00
rustc_error_codes Auto merge of #86860 - fee1-dead:stabilize, r=LeSeulArtichaut 2021-08-18 01:00:17 +00:00
rustc_errors Modify structured suggestion output 2021-08-11 09:46:24 +00:00
rustc_expand Introduce hir::ExprKind::Let - Take 2 2021-08-15 16:18:26 -03:00
rustc_feature Auto merge of #86860 - fee1-dead:stabilize, r=LeSeulArtichaut 2021-08-18 01:00:17 +00:00
rustc_fs_util
rustc_graphviz
rustc_hir Introduce hir::ExprKind::Let - Take 2 2021-08-15 16:18:26 -03:00
rustc_hir_pretty Introduce hir::ExprKind::Let - Take 2 2021-08-15 16:18:26 -03:00
rustc_incremental
rustc_index
rustc_infer Auto merge of #86700 - lqd:matthews-nll-hrtb-errors, r=nikomatsakis 2021-08-18 15:54:59 +00:00
rustc_interface Replace #[plugin_registrar] with exporting __rustc_plugin_registrar 2021-08-10 14:20:48 +02:00
rustc_lexer Renamed variable str -> tail for clarity 2021-08-11 13:57:28 +02:00
rustc_lint Remove box syntax from rustc_lint 2021-08-18 09:31:51 +02:00
rustc_lint_defs Auto merge of #87324 - asquared31415:named-asm-labels, r=Amanieu 2021-08-14 17:33:38 +00:00
rustc_llvm Auto merge of #87798 - durin42:llvm-14, r=nikic 2021-08-08 04:33:22 +00:00
rustc_macros Rollup merge of #86123 - Aaron1011:query-span, r=cjgillot 2021-08-19 19:30:04 +02:00
rustc_metadata Include (potentially remapped) working dir in crate hash 2021-08-15 15:17:37 -05:00
rustc_middle Auto merge of #87781 - est31:remove_box, r=oli-obk 2021-08-18 10:43:27 +00:00
rustc_mir Auto merge of #88124 - tmiasko:start-block-critical-edge, r=oli-obk 2021-08-19 14:35:16 +00:00
rustc_mir_build Remove box syntax from rustc_mir_build 2021-08-18 09:25:26 +02:00
rustc_parse Remove box syntax from rustc_parse 2021-08-18 09:25:26 +02:00
rustc_parse_format
rustc_passes Rollup merge of #88036 - nbdd0121:const3, r=petrochenkov 2021-08-18 19:54:59 +02:00
rustc_plugin_impl Replace #[plugin_registrar] with exporting __rustc_plugin_registrar 2021-08-10 14:20:48 +02:00
rustc_privacy move Constness into TraitPredicate 2021-08-13 09:26:33 +00:00
rustc_query_impl
rustc_query_system Prevent double panic when handling incremental fingerprint mismatch 2021-08-12 15:11:39 -05:00
rustc_resolve review comment: use newtype to deduplicate logic 2021-08-18 14:05:15 +00:00
rustc_save_analysis Include (potentially remapped) working dir in crate hash 2021-08-15 15:17:37 -05:00
rustc_serialize Remove box syntax from rustc_serialize 2021-08-18 09:25:26 +02:00
rustc_session Include (potentially remapped) working dir in crate hash 2021-08-15 15:17:37 -05:00
rustc_span Auto merge of #87050 - jyn514:no-doc-primitive, r=manishearth 2021-08-16 15:36:44 +00:00
rustc_symbol_mangling Auto merge of #85296 - bjorn3:plugin_cleanup, r=petrochenkov 2021-08-12 04:30:41 +00:00
rustc_target Auto merge of #88023 - devnexen:fbsd_arm64, r=nagisa 2021-08-19 11:54:27 +00:00
rustc_trait_selection Auto merge of #86700 - lqd:matthews-nll-hrtb-errors, r=nikomatsakis 2021-08-18 15:54:59 +00:00
rustc_traits Auto merge of #86700 - lqd:matthews-nll-hrtb-errors, r=nikomatsakis 2021-08-18 15:54:59 +00:00
rustc_ty_utils
rustc_type_ir
rustc_typeck Remove box syntax from rustc_typeck 2021-08-18 09:25:26 +02:00