File tree 4 files changed +6
-6
lines changed
rustc_mir_transform/src/coverage
4 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -619,11 +619,11 @@ pub fn eval_condition(
619
619
// we can't use `try_gate_cfg` as symbols don't differentiate between `r#true`
620
620
// and `true`, and we want to keep the former working without feature gate
621
621
gate_cfg (
622
- & ( (
622
+ & (
623
623
if * b { kw:: True } else { kw:: False } ,
624
624
sym:: cfg_boolean_literals,
625
625
|features : & Features | features. cfg_boolean_literals ( ) ,
626
- ) ) ,
626
+ ) ,
627
627
cfg. span ( ) ,
628
628
sess,
629
629
features,
Original file line number Diff line number Diff line change @@ -277,9 +277,9 @@ pub fn create_dump_file<'tcx>(
277
277
)
278
278
} ) ?;
279
279
}
280
- Ok ( fs:: File :: create_buffered ( & file_path) . map_err ( |e| {
280
+ fs:: File :: create_buffered ( & file_path) . map_err ( |e| {
281
281
io:: Error :: new ( e. kind ( ) , format ! ( "IO error creating MIR dump file: {file_path:?}; {e}" ) )
282
- } ) ? )
282
+ } )
283
283
}
284
284
285
285
///////////////////////////////////////////////////////////////////////////
Original file line number Diff line number Diff line change @@ -363,7 +363,7 @@ fn calc_test_vectors_index(conditions: &mut Vec<MCDCBranch>) -> usize {
363
363
let ConditionInfo { condition_id, true_next_id, false_next_id } = branch. condition_info ;
364
364
[ true_next_id, false_next_id]
365
365
. into_iter ( )
366
- . filter_map ( std :: convert :: identity )
366
+ . flatten ( )
367
367
. for_each ( |next_id| indegree_stats[ next_id] += 1 ) ;
368
368
( condition_id, branch)
369
369
} )
Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ fn remove_unwanted_expansion_spans(covspans: &mut Vec<SpanFromMir>) {
87
87
covspans. retain ( |covspan| {
88
88
match covspan. expn_kind {
89
89
// Retain only the first await-related or macro-expanded covspan with this span.
90
- Some ( ExpnKind :: Desugaring ( kind ) ) if kind == DesugaringKind :: Await => {
90
+ Some ( ExpnKind :: Desugaring ( DesugaringKind :: Await ) ) => {
91
91
deduplicated_spans. insert ( covspan. span )
92
92
}
93
93
Some ( ExpnKind :: Macro ( MacroKind :: Bang , _) ) => deduplicated_spans. insert ( covspan. span ) ,
You can’t perform that action at this time.
0 commit comments