Skip to content

Commit

Permalink
Hint type for .sum()
Browse files Browse the repository at this point in the history
  • Loading branch information
AnthonyMikh authored Oct 1, 2019
1 parent 515262c commit fdce416
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc_errors/emitter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1526,7 +1526,7 @@ impl EmitterWriter {
// length of the code after substitution
let full_sub_len = part.snippet.chars()
.map(|ch| unicode_width::UnicodeWidthChar::width(ch).unwrap_or(1))
.sum() as isize;
.sum::<usize>() as isize;

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

0 comments on commit fdce416

Please sign in to comment.