@@ -1526,7 +1526,7 @@ fn detect_discriminant_duplicate<'tcx>(
1526
1526
}
1527
1527
None => {
1528
1528
// At this point we know this discriminant is a duplicate, and was not explicitly
1529
- // assigned by the user. Here we iterate backwards to fetch the hir for the last
1529
+ // assigned by the user. Here we iterate backwards to fetch the HIR for the last
1530
1530
// explictly assigned discriminant, and letting the user know that this was the
1531
1531
// increment startpoint, and how many steps from there leading to the duplicate
1532
1532
if let Some ( ( n, hir:: Variant { span, ident, .. } ) ) =
@@ -1549,12 +1549,12 @@ fn detect_discriminant_duplicate<'tcx>(
1549
1549
err. span_label ( span, format ! ( "{display_discr} assigned here" ) ) ;
1550
1550
} ;
1551
1551
1552
- // Here we are looping through the discriminant vec , comparing each discriminant to oneanother .
1553
- // When a duplicate is detected, we instatiate an error and add a spanned note pointing to both
1554
- // initial and duplicate value. The duplicate discriminant is then discarded from the vec by swapping
1555
- // it with the last element and decrementing the vec.len by 1 (which is why we have to evaluate
1556
- // `discrs.len()` anew every iteration, and why this could be tricky to do in a functional style as
1557
- // we are mutating `discrs` on the fly).
1552
+ // Here we are loop through the discriminants , comparing each discriminant to another .
1553
+ // When a duplicate is detected, we instatiate an error and point to both
1554
+ // initial and duplicate value. The duplicate discriminant is then discarded by swapping
1555
+ // it with the last element and decrementing the ` vec.len` (which is why we have to evaluate
1556
+ // `discrs.len()` anew every iteration, and why this could be tricky to do in a functional
1557
+ // style as we are mutating `discrs` on the fly).
1558
1558
let mut i = 0 ;
1559
1559
while i < discrs. len ( ) {
1560
1560
let hir_var_i_idx = discrs[ i] . 0 . index ( ) ;
0 commit comments