Skip to content

Commit 6074487

Browse files
committed
!! (WIP) FunctionCoverageInfo (empty, unused)
1 parent 369904f commit 6074487

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

compiler/rustc_middle/src/mir/coverage.rs

+3
Original file line numberDiff line numberDiff line change
@@ -142,3 +142,6 @@ impl Op {
142142
matches!(self, Self::Subtract)
143143
}
144144
}
145+
146+
#[derive(Clone, Debug, TyEncodable, TyDecodable, Hash, HashStable, TypeFoldable, TypeVisitable)]
147+
pub struct FunctionCoverageInfo {}

compiler/rustc_middle/src/mir/mod.rs

+4
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,8 @@ pub struct Body<'tcx> {
304304
pub injection_phase: Option<MirPhase>,
305305

306306
pub tainted_by_errors: Option<ErrorGuaranteed>,
307+
308+
pub coverage_info: Option<Box<coverage::FunctionCoverageInfo>>,
307309
}
308310

309311
impl<'tcx> Body<'tcx> {
@@ -351,6 +353,7 @@ impl<'tcx> Body<'tcx> {
351353
is_polymorphic: false,
352354
injection_phase: None,
353355
tainted_by_errors,
356+
coverage_info: None,
354357
};
355358
body.is_polymorphic = body.has_non_region_param();
356359
body
@@ -379,6 +382,7 @@ impl<'tcx> Body<'tcx> {
379382
is_polymorphic: false,
380383
injection_phase: None,
381384
tainted_by_errors: None,
385+
coverage_info: None,
382386
};
383387
body.is_polymorphic = body.has_non_region_param();
384388
body

compiler/rustc_mir_build/src/build/custom/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ pub(super) fn build_custom_mir<'tcx>(
6060
tainted_by_errors: None,
6161
injection_phase: None,
6262
pass_count: 0,
63+
coverage_info: None,
6364
};
6465

6566
body.local_decls.push(LocalDecl::new(return_ty, return_ty_span));

0 commit comments

Comments
 (0)