rust/compiler
Matthias Krüger 80c94e81d9
Rollup merge of #118525 - Zalathar:skip-spans, r=cjgillot
coverage: Skip spans that can't be un-expanded back to the function body

When we extract coverage spans from MIR, we try to "un-expand" them back to spans that are inside the function's body span.

In cases where that doesn't succeed, the current code just swaps in the entire body span instead. But that tends to result in coverage spans that are completely unrelated to the control flow of the affected code, so it's better to just discard those spans.

---

Extracted from #118305, since this is a general improvement that isn't specific to branch coverage.

---

`@rustbot` label +A-code-coverage
2023-12-03 21:28:32 +01:00
..
rustc
rustc_abi Rename LayoutCalculator::delay_bug as LayoutCalculator::delayed_bug. 2023-12-02 09:01:34 +11:00
rustc_arena
rustc_ast Auto merge of #117912 - GeorgeWort:master, r=petrochenkov 2023-12-02 13:38:47 +00:00
rustc_ast_lowering Avoid per-register closure expansions 2023-12-02 15:31:18 -05:00
rustc_ast_passes Auto merge of #118470 - nnethercote:cleanup-error-handlers, r=compiler-errors 2023-12-02 02:48:34 +00:00
rustc_ast_pretty
rustc_attr Use Session::diagnostic in more places. 2023-12-02 09:01:35 +11:00
rustc_baked_icu_data
rustc_borrowck Auto merge of #118470 - nnethercote:cleanup-error-handlers, r=compiler-errors 2023-12-02 02:48:34 +00:00
rustc_builtin_macros Auto merge of #118470 - nnethercote:cleanup-error-handlers, r=compiler-errors 2023-12-02 02:48:34 +00:00
rustc_codegen_cranelift
rustc_codegen_gcc
rustc_codegen_llvm Auto merge of #113923 - DianQK:restore-no-builtins-lto, r=pnkfelix 2023-12-01 21:45:18 +00:00
rustc_codegen_ssa Auto merge of #113730 - belovdv:jobserver-init-check, r=petrochenkov 2023-12-03 16:28:22 +00:00
rustc_const_eval Auto merge of #118470 - nnethercote:cleanup-error-handlers, r=compiler-errors 2023-12-02 02:48:34 +00:00
rustc_data_structures
rustc_driver
rustc_driver_impl Auto merge of #118472 - nnethercote:rustc_session, r=bjorn3 2023-12-01 00:08:04 +00:00
rustc_error_codes
rustc_error_messages
rustc_errors Handler tweaks. 2023-12-02 09:01:34 +11:00
rustc_expand Use Session::diagnostic in more places. 2023-12-02 09:01:35 +11:00
rustc_feature Auto merge of #118470 - nnethercote:cleanup-error-handlers, r=compiler-errors 2023-12-02 02:48:34 +00:00
rustc_fluent_macro
rustc_fs_util
rustc_graphviz
rustc_hir
rustc_hir_analysis Rename HandlerInner::delay_span_bug as HandlerInner::span_delayed_bug. 2023-12-02 09:01:19 +11:00
rustc_hir_pretty
rustc_hir_typeck Rollup merge of #118514 - Enselic:ice-probe, r=cjgillot 2023-12-02 16:58:40 +01:00
rustc_incremental Rename HandlerInner::delayed_span_bugs as HandlerInner::span_delayed_bugs. 2023-12-02 09:01:34 +11:00
rustc_index
rustc_index_macros
rustc_infer Use Session::diagnostic in more places. 2023-12-02 09:01:35 +11:00
rustc_interface Use Session::diagnostic in more places. 2023-12-02 09:01:35 +11:00
rustc_lexer
rustc_lint Auto merge of #118470 - nnethercote:cleanup-error-handlers, r=compiler-errors 2023-12-02 02:48:34 +00:00
rustc_lint_defs vis note for no pub reexports glob import 2023-12-01 12:10:07 +08:00
rustc_llvm Auto merge of #113923 - DianQK:restore-no-builtins-lto, r=pnkfelix 2023-12-01 21:45:18 +00:00
rustc_log
rustc_macros
rustc_metadata Use Session::diagnostic in more places. 2023-12-02 09:01:35 +11:00
rustc_middle fix an ICE when a valtree failed to evaluate 2023-12-02 10:38:42 +01:00
rustc_mir_build Rename HandlerInner::delay_span_bug as HandlerInner::span_delayed_bug. 2023-12-02 09:01:19 +11:00
rustc_mir_dataflow
rustc_mir_transform coverage: Skip spans that can't be un-expanded back to the function body 2023-12-03 12:35:33 +11:00
rustc_monomorphize
rustc_parse Auto merge of #118542 - chenyukang:yukang-fix-parser-ice-118531, r=cjgillot 2023-12-03 03:05:17 +00:00
rustc_parse_format
rustc_passes Rename HandlerInner::delay_span_bug as HandlerInner::span_delayed_bug. 2023-12-02 09:01:19 +11:00
rustc_privacy Auto merge of #118470 - nnethercote:cleanup-error-handlers, r=compiler-errors 2023-12-02 02:48:34 +00:00
rustc_query_impl
rustc_query_system Use Session::diagnostic in more places. 2023-12-02 09:01:35 +11:00
rustc_resolve Auto merge of #118470 - nnethercote:cleanup-error-handlers, r=compiler-errors 2023-12-02 02:48:34 +00:00
rustc_serialize
rustc_session Auto merge of #113730 - belovdv:jobserver-init-check, r=petrochenkov 2023-12-03 16:28:22 +00:00
rustc_smir Add more information to stable Instance 2023-12-01 16:22:06 -08:00
rustc_span Rename HandlerInner::delay_span_bug as HandlerInner::span_delayed_bug. 2023-12-02 09:01:19 +11:00
rustc_symbol_mangling
rustc_target
rustc_trait_selection Auto merge of #118526 - sjwang05:issue-118510, r=petrochenkov 2023-12-03 14:26:39 +00:00
rustc_traits
rustc_transmute
rustc_ty_utils Rename HandlerInner::delay_span_bug as HandlerInner::span_delayed_bug. 2023-12-02 09:01:19 +11:00
rustc_type_ir
stable_mir Add more information to stable Instance 2023-12-01 16:22:06 -08:00