diff options
| author | Michael Woerister <michaelwoerister@posteo> | 2018-06-26 15:37:09 +0200 |
|---|---|---|
| committer | Michael Woerister <michaelwoerister@posteo> | 2018-06-27 14:00:34 +0200 |
| commit | ba30c1dac9d0af45836403b2da89561a627b9a6e (patch) | |
| tree | 77aa96d6becfcf3ad169630185cbb0aad4f5d556 /src/libsyntax | |
| parent | ba1d18fe299cc6e44be7b5d10be004d7e3f3e6ea (diff) | |
syntax_pos: Store multibyte char size as u8 instead of u32.
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/codemap.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/codemap.rs b/src/libsyntax/codemap.rs index 68882c4f063..1d5429bdf8f 100644 --- a/src/libsyntax/codemap.rs +++ b/src/libsyntax/codemap.rs @@ -819,10 +819,10 @@ impl CodeMap { if mbc.pos < bpos { // every character is at least one byte, so we only // count the actual extra bytes. - total_extra_bytes += mbc.bytes - 1; + total_extra_bytes += mbc.bytes as u32 - 1; // We should never see a byte position in the middle of a // character - assert!(bpos.to_u32() >= mbc.pos.to_u32() + mbc.bytes); + assert!(bpos.to_u32() >= mbc.pos.to_u32() + mbc.bytes as u32); } else { break; } |
