We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
.sum()
1 parent 515262c commit fdce416Copy full SHA for fdce416
src/librustc_errors/emitter.rs
@@ -1526,7 +1526,7 @@ impl EmitterWriter {
1526
// length of the code after substitution
1527
let full_sub_len = part.snippet.chars()
1528
.map(|ch| unicode_width::UnicodeWidthChar::width(ch).unwrap_or(1))
1529
- .sum() as isize;
+ .sum::<usize>() as isize;
1530
1531
// length of the code to be substituted
1532
let snippet_len = span_end_pos as isize - span_start_pos as isize;
0 commit comments