diff options
| author | AnthonyMikh <anthony.mikh@yandex.ru> | 2019-10-01 03:04:01 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-10-01 03:04:01 +0300 |
| commit | fdce4168fc4c0a46bbe59d482f3d8a4cb4155537 (patch) | |
| tree | 5b38750f9799f4afc89c58ed58819178244d9a58 /src/librustc_errors | |
| parent | 515262cc131c8b0bb41f8ba2db233f1bf987501e (diff) | |
| download | rust-fdce4168fc4c0a46bbe59d482f3d8a4cb4155537.tar.gz rust-fdce4168fc4c0a46bbe59d482f3d8a4cb4155537.zip | |
Hint type for `.sum()`
Diffstat (limited to 'src/librustc_errors')
| -rw-r--r-- | src/librustc_errors/emitter.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_errors/emitter.rs b/src/librustc_errors/emitter.rs index aaae9965569..263ffb0d17c 100644 --- a/src/librustc_errors/emitter.rs +++ b/src/librustc_errors/emitter.rs @@ -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; |
