rust/compiler
Jubilee 3d4467dfcc
Rollup merge of #89500 - FabianWolff:issue-87308, r=petrochenkov
Fix ICE with buffered lint referring to AST node deleted by everybody_loops

Fixes #87308. Note the following comment:
08759c691e/compiler/rustc_lint/src/early.rs (L415-L417)

As it turns out, this is not _always_ a bug, because `-Zunpretty=everybody_loops` causes a lot of AST nodes to be deleted, and thus some buffered lints will refer to non-existent node ids. To fix this, my changes simply ignore buffered lints if `-Zunpretty=everybody_loops` is enabled, which, from my understanding, shouldn't be a big issue because it only affects pretty-printing. Of course, a more elegant solution would only ignore buffered lints that actually point at deleted node ids, but I haven't figured out an easy way of achieving this.

For the concrete example in #87308, the buffered lint is created [here](08759c691e/compiler/rustc_expand/src/mbe/macro_rules.rs (L145-L151)) with the `lint_node_id` from [here](08759c691e/compiler/rustc_expand/src/mbe/macro_rules.rs (L319)), i.e. it points at the macro _expansion_, which then gets deleted by `ReplaceBodyWithLoop` [here](08759c691e/compiler/rustc_interface/src/passes.rs (L377)).
2021-10-04 13:58:16 -07:00
..
rustc Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_apfloat Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_arena Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_ast Improve error message for missing angle brackets in [_]::method 2021-10-01 23:03:28 +02:00
rustc_ast_lowering Add desugaring mark to while loop 2021-10-02 17:41:14 -05:00
rustc_ast_passes Practice diagnostic message convention 2021-10-03 16:16:28 +09:00
rustc_ast_pretty Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_attr Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_borrowck Rollup merge of #88481 - bjorn3:remove_feature_gates, r=cjgillot 2021-10-03 23:13:20 -07:00
rustc_builtin_macros Practice diagnostic message convention 2021-10-03 16:16:28 +09:00
rustc_codegen_cranelift Update compiler/rustc_codegen_cranelift/scripts/filter_profile.rs 2021-09-30 19:41:32 +02:00
rustc_codegen_gcc Rebase fallout. 2021-09-30 20:22:42 +02:00
rustc_codegen_llvm Rollup merge of #83655 - sebpop:arm64-outline-atomics, r=workingjubilee 2021-10-04 13:58:06 -07:00
rustc_codegen_ssa Rollup merge of #88820 - hlopko:add_pie_relocation_model, r=petrochenkov 2021-10-01 09:18:16 -07:00
rustc_const_eval Practice diagnostic message convention 2021-10-03 16:16:28 +09:00
rustc_data_structures Remove various unused feature gates 2021-10-02 19:09:18 +02:00
rustc_driver Rollup merge of #89453 - waywardmonkeys:consistent-supertrait-usage, r=nagisa 2021-10-04 13:58:14 -07:00
rustc_error_codes Consistently use 'supertrait'. 2021-10-02 08:05:44 +07:00
rustc_errors Rollup merge of #89046 - oli-obk:fix_oflo, r=estebank 2021-09-22 19:03:22 +02:00
rustc_expand Improve help for recursion limit errors 2021-09-28 22:17:13 +02:00
rustc_feature Stabilize feature(macro_attributes_in_derive_output) 2021-09-24 21:48:30 +03:00
rustc_fs_util Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_graphviz Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_hir Auto merge of #88880 - cjgillot:no-krate, r=oli-obk 2021-10-01 20:06:34 +00:00
rustc_hir_pretty Avoid more invocations of hir_crate query. 2021-09-29 23:16:47 +02:00
rustc_incremental Avoid more invocations of hir_crate query. 2021-09-29 23:16:47 +02:00
rustc_index Replace Fn impls with RPIT impls in rustc_index 2021-10-03 17:50:53 +02:00
rustc_infer Make diangostic item names consistent 2021-10-02 19:38:19 -05:00
rustc_interface Fix ICE with buffered lint referring to AST node deleted by everybody_loops 2021-10-03 21:04:36 +02:00
rustc_lexer Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_lint Rollup merge of #89483 - hkmatsumoto:patch-diagnostics-2, r=estebank 2021-10-04 13:58:15 -07:00
rustc_lint_defs Auto merge of #88865 - guswynn:must_not_suspend, r=oli-obk 2021-09-22 06:43:33 +00:00
rustc_llvm Fix clippy lints 2021-10-01 23:17:19 +02:00
rustc_macros Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_metadata Rollup merge of #89483 - hkmatsumoto:patch-diagnostics-2, r=estebank 2021-10-04 13:58:15 -07:00
rustc_middle Rollup merge of #89453 - waywardmonkeys:consistent-supertrait-usage, r=nagisa 2021-10-04 13:58:14 -07:00
rustc_mir_build Rollup merge of #89441 - Nadrieril:fix-89393, r=tmandry 2021-10-01 14:46:52 -07:00
rustc_mir_dataflow Replace Fn impls with RPIT impls in rustc_index 2021-10-03 17:50:53 +02:00
rustc_mir_transform Auto merge of #89489 - FabianWolff:issue-89485, r=oli-obk 2021-10-04 10:09:04 +00:00
rustc_monomorphize Avoid more invocations of hir_crate query. 2021-09-29 23:16:47 +02:00
rustc_parse Rollup merge of #89029 - notriddle:notriddle/issue-89013, r=estebank 2021-10-01 09:18:17 -07:00
rustc_parse_format Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_passes Practice diagnostic message convention 2021-10-03 16:16:28 +09:00
rustc_plugin_impl Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_privacy Auto merge of #89405 - GuillaumeGomez:fix-clippy-lints, r=cjgillot 2021-10-02 10:52:09 +00:00
rustc_query_impl Auto merge of #89120 - In-line:remove_unneded_visible_parents_map, r=estebank 2021-09-24 05:29:49 +00:00
rustc_query_system Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_resolve Practice diagnostic message convention 2021-10-03 16:16:28 +09:00
rustc_save_analysis Consistently use 'supertrait'. 2021-10-02 08:05:44 +07:00
rustc_serialize Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_session Practice diagnostic message convention 2021-10-03 16:16:28 +09:00
rustc_span Auto merge of #88175 - camsteffen:let-desugar-span, r=Manishearth 2021-10-03 21:44:10 +00:00
rustc_symbol_mangling Avoid more invocations of hir_crate query. 2021-09-29 23:16:47 +02:00
rustc_target Remove various unused feature gates 2021-10-02 19:09:18 +02:00
rustc_trait_selection Practice diagnostic message convention 2021-10-03 16:16:28 +09:00
rustc_traits Improve cause information for NLL higher-ranked errors 2021-09-27 10:23:45 -05:00
rustc_ty_utils Remove various unused feature gates 2021-10-02 19:09:18 +02:00
rustc_type_ir Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_typeck Rollup merge of #89453 - waywardmonkeys:consistent-supertrait-usage, r=nagisa 2021-10-04 13:58:14 -07:00