Skip to content

Commit 637e50d

Browse files
committed
Accommodate arith-overflow in rustc_typeck::astconv.
1 parent acf30db commit 637e50d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/librustc_typeck/astconv.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,9 @@ pub fn opt_ast_region_to_region<'tcx>(
200200

201201
if len == 2 && i == 0 {
202202
m.push_str(" or ");
203-
} else if i == len - 2 {
203+
} else if i + 2 == len {
204204
m.push_str(", or ");
205-
} else if i != len - 1 {
205+
} else if i + 1 != len {
206206
m.push_str(", ");
207207
}
208208
}

0 commit comments

Comments
 (0)