@@ -10,7 +10,7 @@ use rustc_middle::ty::TyCtxt;
1010use rustc_span:: Span ;
1111
1212use crate :: coverage:: ExtractedHirInfo ;
13- use crate :: coverage:: graph:: { BasicCoverageBlock , CoverageGraph , START_BCB } ;
13+ use crate :: coverage:: graph:: { BasicCoverageBlock , CoverageGraph } ;
1414use crate :: coverage:: spans:: extract_refined_covspans;
1515use crate :: coverage:: unexpand:: unexpand_into_body_span;
1616use crate :: errors:: MCDCExceedsTestVectorLimit ;
@@ -82,18 +82,8 @@ pub(super) fn extract_all_mapping_info_from_mir<'tcx>(
8282 let mut mcdc_degraded_branches = vec ! [ ] ;
8383 let mut mcdc_mappings = vec ! [ ] ;
8484
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) ;
9787
9888 branch_pairs. extend ( extract_branch_pairs ( mir_body, hir_info, graph) ) ;
9989
0 commit comments