diff options
Diffstat (limited to 'src/libsyntax/parse/lexer')
| -rw-r--r-- | src/libsyntax/parse/lexer/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/parse/lexer/mod.rs b/src/libsyntax/parse/lexer/mod.rs index cb3323c7eca..22a0261d8c6 100644 --- a/src/libsyntax/parse/lexer/mod.rs +++ b/src/libsyntax/parse/lexer/mod.rs @@ -133,12 +133,12 @@ impl<'a> StringReader<'a> { Ok(ret_val) } - fn fail_unterminated_raw_string(&self, pos: BytePos, hash_count: usize) { + fn fail_unterminated_raw_string(&self, pos: BytePos, hash_count: u16) { let mut err = self.struct_span_fatal(pos, pos, "unterminated raw string"); err.span_label(self.mk_sp(pos, pos), "unterminated raw string"); if hash_count > 0 { err.note(&format!("this raw string should be terminated with `\"{}`", - "#".repeat(hash_count))); + "#".repeat(hash_count as usize))); } err.emit(); FatalError.raise(); @@ -1439,7 +1439,7 @@ impl<'a> StringReader<'a> { 'r' => { let start_bpos = self.pos; self.bump(); - let mut hash_count = 0; + let mut hash_count: u16 = 0; while self.ch_is('#') { self.bump(); hash_count += 1; |
