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! {
5151 pub struct ExpressionId { }
5252}
5353
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+
5462rustc_index:: newtype_index! {
5563 /// ID of a mcdc condition. Used by llvm to check mcdc coverage.
5664 ///
Original file line number Diff line number Diff line change @@ -238,12 +238,11 @@ impl<'tcx> Builder<'_, 'tcx> {
238238
239239 // Separate path for handling branches when MC/DC is enabled.
240240 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) ;
244243 mcdc_info. visit_evaluated_condition (
245244 self . tcx ,
246- source_info,
245+ source_info. span ,
247246 then_block,
248247 else_block,
249248 inject_block_marker,
You can’t perform that action at this time.
0 commit comments