Skip to content

Commit fdce416

Browse files
authored
Hint type for .sum()
1 parent 515262c commit fdce416

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc_errors/emitter.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1526,7 +1526,7 @@ impl EmitterWriter {
15261526
// length of the code after substitution
15271527
let full_sub_len = part.snippet.chars()
15281528
.map(|ch| unicode_width::UnicodeWidthChar::width(ch).unwrap_or(1))
1529-
.sum() as isize;
1529+
.sum::<usize>() as isize;
15301530

15311531
// length of the code to be substituted
15321532
let snippet_len = span_end_pos as isize - span_start_pos as isize;

0 commit comments

Comments
 (0)