rust/compiler
Dylan DPC 3bd163f4e8
Rollup merge of #94327 - Mark-Simulacrum:avoid-macro-sp, r=petrochenkov
Avoid emitting full macro body into JSON errors

While investigating https://github.com/rust-lang/rust/issues/94322, it was noted that currently the JSON diagnostics for macro backtraces include the full def_site span -- the whole macro body.

It seems like this shouldn't be necessary, so this PR adjusts the span to just be the "guessed head", typically the macro name. It doesn't look like we keep enough information to synthesize a nicer span here at this time.

Atop #92123, this reduces output for the src/test/ui/suggestions/missing-lifetime-specifier.rs test from 660 KB to 156 KB locally.
2022-02-24 21:42:19 +01:00
..
rustc remove unused jemallocator crate 2022-01-28 16:56:05 +01:00
rustc_apfloat
rustc_arena Remove unused dep from rustc_arena 2022-02-02 17:37:14 +01:00
rustc_ast Rollup merge of #94316 - nnethercote:improve-string-literal-unescaping, r=petrochenkov 2022-02-24 21:42:18 +01:00
rustc_ast_lowering resolve: Fix incorrect results of opt_def_kind query for some built-in macros 2022-02-24 22:54:36 +03:00
rustc_ast_passes Rollup merge of #94146 - est31:let_else, r=cjgillot 2022-02-20 00:37:34 +01:00
rustc_ast_pretty Pretty print ItemKind::Use in rustfmt style 2022-02-07 21:51:05 -08:00
rustc_attr Rollup merge of #94175 - Urgau:check-cfg-improvements, r=petrochenkov 2022-02-24 21:42:13 +01:00
rustc_borrowck Auto merge of #94131 - Mark-Simulacrum:fmt-string, r=oli-obk 2022-02-24 17:18:07 +00:00
rustc_builtin_macros Rollup merge of #94146 - est31:let_else, r=cjgillot 2022-02-20 00:37:34 +01:00
rustc_codegen_cranelift Normalize main return type during mono item collection & codegen 2022-02-23 22:33:50 +01:00
rustc_codegen_gcc Auto merge of #94123 - bjorn3:cg_ssa_singleton_builder, r=tmiasko 2022-02-24 12:28:19 +00:00
rustc_codegen_llvm Rollup merge of #94242 - compiler-errors:fat-uninhabitable-pointer, r=michaelwoerister 2022-02-24 21:42:15 +01:00
rustc_codegen_ssa Rollup merge of #94308 - tmiasko:normalize-main-ret-ty, r=oli-obk 2022-02-24 21:42:16 +01:00
rustc_const_eval Auto merge of #94131 - Mark-Simulacrum:fmt-string, r=oli-obk 2022-02-24 17:18:07 +00:00
rustc_data_structures Rollup merge of #94288 - Mark-Simulacrum:ser-opt, r=nnethercote 2022-02-24 07:48:09 +01:00
rustc_driver Rollup merge of #94146 - est31:let_else, r=cjgillot 2022-02-20 00:37:34 +01:00
rustc_error_codes Revert "Auto merge of #91403 - cjgillot:inherit-async, r=oli-obk" 2022-02-17 16:00:04 +00:00
rustc_errors Avoid emitting full macro body into JSON 2022-02-24 11:16:45 -05:00
rustc_expand Rollup merge of #94146 - est31:let_else, r=cjgillot 2022-02-20 00:37:34 +01:00
rustc_feature fix names in feature(...) suggestion 2022-02-21 01:17:37 -08:00
rustc_fs_util
rustc_graphviz eplace usages of vec![].into_iter with [].into_iter 2022-01-09 14:09:25 +11:00
rustc_hir resolve: Fix incorrect results of opt_def_kind query for some built-in macros 2022-02-24 22:54:36 +03:00
rustc_hir_pretty resolve: Fix incorrect results of opt_def_kind query for some built-in macros 2022-02-24 22:54:36 +03:00
rustc_incremental Adopt let else in more places 2022-02-19 17:27:43 +01:00
rustc_index Introduce ChunkedBitSet and use it for some dataflow analyses. 2022-02-23 10:18:49 +11:00
rustc_infer Auto merge of #94131 - Mark-Simulacrum:fmt-string, r=oli-obk 2022-02-24 17:18:07 +00:00
rustc_interface Rollup merge of #94175 - Urgau:check-cfg-improvements, r=petrochenkov 2022-02-24 21:42:13 +01:00
rustc_lexer Improve scan_escape. 2022-02-24 17:01:01 +11:00
rustc_lint Rollup merge of #94175 - Urgau:check-cfg-improvements, r=petrochenkov 2022-02-24 21:42:13 +01:00
rustc_lint_defs Improve diagnostic of the unexpected_cfgs lint 2022-02-22 23:17:13 +01:00
rustc_llvm Rollup merge of #91675 - ivanloz:memtagsan, r=nagisa 2022-02-18 23:23:03 +01:00
rustc_log Make rustc_log doc test runnable 2022-01-03 22:31:56 -08:00
rustc_macros Delete Decoder::read_enum_variant 2022-02-20 18:58:23 -05:00
rustc_metadata resolve/metadata: Stop encoding macros as reexports 2022-02-24 22:55:40 +03:00
rustc_middle resolve/metadata: Stop encoding macros as reexports 2022-02-24 22:55:40 +03:00
rustc_mir_build Auto merge of #93505 - lcnr:substsref-vs-ty-list, r=michaelwoerister 2022-02-21 16:03:38 +00:00
rustc_mir_dataflow Auto merge of #93984 - nnethercote:ChunkedBitSet, r=Mark-Simulacrum 2022-02-23 01:26:07 +00:00
rustc_mir_transform Auto merge of #93984 - nnethercote:ChunkedBitSet, r=Mark-Simulacrum 2022-02-23 01:26:07 +00:00
rustc_monomorphize Normalize main return type during mono item collection & codegen 2022-02-23 22:33:50 +01:00
rustc_parse Better error if the user tries to do assignment ... else 2022-02-21 08:59:39 +01:00
rustc_parse_format Correctly mark the span of captured arguments in format_args!() 2022-02-16 07:34:06 +00:00
rustc_passes resolve: Fix incorrect results of opt_def_kind query for some built-in macros 2022-02-24 22:54:36 +03:00
rustc_plugin_impl
rustc_privacy resolve: Fix incorrect results of opt_def_kind query for some built-in macros 2022-02-24 22:54:36 +03:00
rustc_query_impl Auto merge of #94066 - Mark-Simulacrum:factor-out-simple-def-kind, r=davidtwco 2022-02-21 03:36:55 +00:00
rustc_query_system Auto merge of #93839 - Mark-Simulacrum:delete-json-rust-deserialization, r=nnethercote 2022-02-22 07:54:22 +00:00
rustc_resolve resolve/metadata: Stop encoding macros as reexports 2022-02-24 22:55:40 +03:00
rustc_save_analysis resolve: Fix incorrect results of opt_def_kind query for some built-in macros 2022-02-24 22:54:36 +03:00
rustc_serialize Delete Decoder::read_unit 2022-02-22 18:14:51 -05:00
rustc_session Rollup merge of #94175 - Urgau:check-cfg-improvements, r=petrochenkov 2022-02-24 21:42:13 +01:00
rustc_span Rollup merge of #94169 - Amanieu:asm_stuff, r=nagisa 2022-02-22 12:16:28 +01:00
rustc_symbol_mangling Rename region_should_not_be_omitted to should_print_region 2022-02-23 08:58:36 +01:00
rustc_target riscv32imc_esp_espidf: set max_atomic_width to 64 2022-02-23 13:11:26 +00:00
rustc_trait_selection restore spans for issue-50480 2022-02-24 08:40:59 -08:00
rustc_traits use List<Ty<'tcx>> for tuples 2022-02-21 07:09:11 +01:00
rustc_ty_utils use List<Ty<'tcx>> for tuples 2022-02-21 07:09:11 +01:00
rustc_type_ir Inline UnifyKey::index and UnifyKey::from_index 2022-02-15 19:07:06 +01:00
rustc_typeck Rollup merge of #94315 - lcnr:auto-trait-lint-update, r=oli-obk 2022-02-24 21:42:17 +01:00