We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f4a7ce9 commit 2f02a4eCopy full SHA for 2f02a4e
compiler/rustc_mir_transform/src/coverage/mod.rs
@@ -515,7 +515,7 @@ fn make_code_region(
515
// Extend an empty span by one character so the region will be counted.
516
let CharPos(char_pos) = start_col;
517
if span.hi() == body_span.hi() {
518
- start_col = CharPos(char_pos - 1);
+ start_col = CharPos(char_pos.saturating_sub(1));
519
} else {
520
end_col = CharPos(char_pos + 1);
521
}
0 commit comments