@@ -10,7 +10,7 @@ use rustc_middle::ty::TyCtxt;
10
10
use rustc_span:: Span ;
11
11
12
12
use crate :: coverage:: ExtractedHirInfo ;
13
- use crate :: coverage:: graph:: { BasicCoverageBlock , CoverageGraph , START_BCB } ;
13
+ use crate :: coverage:: graph:: { BasicCoverageBlock , CoverageGraph } ;
14
14
use crate :: coverage:: spans:: extract_refined_covspans;
15
15
use crate :: coverage:: unexpand:: unexpand_into_body_span;
16
16
use crate :: errors:: MCDCExceedsTestVectorLimit ;
@@ -82,18 +82,8 @@ pub(super) fn extract_all_mapping_info_from_mir<'tcx>(
82
82
let mut mcdc_degraded_branches = vec ! [ ] ;
83
83
let mut mcdc_mappings = vec ! [ ] ;
84
84
85
- if hir_info. is_async_fn {
86
- // An async function desugars into a function that returns a future,
87
- // with the user code wrapped in a closure. Any spans in the desugared
88
- // outer function will be unhelpful, so just keep the signature span
89
- // and ignore all of the spans in the MIR body.
90
- if let Some ( span) = hir_info. fn_sig_span {
91
- code_mappings. push ( CodeMapping { span, bcb : START_BCB } ) ;
92
- }
93
- } else {
94
- // Extract coverage spans from MIR statements/terminators as normal.
95
- extract_refined_covspans ( tcx, mir_body, hir_info, graph, & mut code_mappings) ;
96
- }
85
+ // Extract ordinary code mappings from MIR statement/terminator spans.
86
+ extract_refined_covspans ( tcx, mir_body, hir_info, graph, & mut code_mappings) ;
97
87
98
88
branch_pairs. extend ( extract_branch_pairs ( mir_body, hir_info, graph) ) ;
99
89
0 commit comments