File tree Expand file tree Collapse file tree 3 files changed +307
-133
lines changed
rustc_mir_build/src/build Expand file tree Collapse file tree 3 files changed +307
-133
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,14 @@ rustc_index::newtype_index! {
51
51
pub struct ExpressionId { }
52
52
}
53
53
54
+ rustc_index:: newtype_index! {
55
+ /// ID of a mcdc decision. Used to identify decision in a function.
56
+ #[ derive( HashStable ) ]
57
+ #[ encodable]
58
+ #[ debug_format = "DecisionId({})" ]
59
+ pub struct DecisionId { }
60
+ }
61
+
54
62
rustc_index:: newtype_index! {
55
63
/// ID of a mcdc condition. Used by llvm to check mcdc coverage.
56
64
///
Original file line number Diff line number Diff line change @@ -238,12 +238,11 @@ impl<'tcx> Builder<'_, 'tcx> {
238
238
239
239
// Separate path for handling branches when MC/DC is enabled.
240
240
if let Some ( mcdc_info) = branch_info. mcdc_info . as_mut ( ) {
241
- let inject_block_marker = |source_info, block| {
242
- branch_info. markers . inject_block_marker ( & mut self . cfg , source_info, block)
243
- } ;
241
+ let inject_block_marker =
242
+ |block| branch_info. markers . inject_block_marker ( & mut self . cfg , source_info, block) ;
244
243
mcdc_info. visit_evaluated_condition (
245
244
self . tcx ,
246
- source_info,
245
+ source_info. span ,
247
246
then_block,
248
247
else_block,
249
248
inject_block_marker,
You can’t perform that action at this time.
0 commit comments