coverageinfo query needs to use the same MIR as codegen
I ran into an error trying to fix dead block coverage and realized the `coverageinfo` query is getting a different MIR compared to the codegenned MIR, which can sometimes be a problem during mapgen. I changed that query to use the `InstandeDef` (which includes the generic parameter substitutions, prosibly specific to const params) instead of the `DefId` (without unknown/default const substitutions).
This commit is contained in:
@@ -156,16 +156,6 @@ impl<'a, 'tcx> Instrumentor<'a, 'tcx> {
|
||||
let fn_sig_span = self.fn_sig_span;
|
||||
let body_span = self.body_span;
|
||||
|
||||
<<<<<<< HEAD
|
||||
debug!(
|
||||
"instrumenting {:?}, fn sig span: {}, body span: {}",
|
||||
def_id,
|
||||
source_map.span_to_diagnostic_string(fn_sig_span),
|
||||
source_map.span_to_diagnostic_string(body_span)
|
||||
);
|
||||
|
||||
=======
|
||||
>>>>>>> 476104d0f54 (Simplified body_span and filtered span code)
|
||||
let mut graphviz_data = debug::GraphvizData::new();
|
||||
let mut debug_used_expressions = debug::UsedExpressions::new();
|
||||
|
||||
@@ -572,7 +562,7 @@ fn get_body_span<'tcx>(
|
||||
if expn_data.is_root() {
|
||||
break;
|
||||
}
|
||||
if let ExpnKind::Macro{..} = expn_data.kind {
|
||||
if let ExpnKind::Macro { .. } = expn_data.kind {
|
||||
body_span = expn_data.call_site;
|
||||
} else {
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user