diff --git a/src/libsyntax/parse/lexer/mod.rs b/src/libsyntax/parse/lexer/mod.rs index cd4944deadb10..d0162ef170482 100644 --- a/src/libsyntax/parse/lexer/mod.rs +++ b/src/libsyntax/parse/lexer/mod.rs @@ -43,16 +43,16 @@ pub struct UnmatchedBrace { } pub struct StringReader<'a> { - pub sess: &'a ParseSess, + crate sess: &'a ParseSess, /// The absolute offset within the source_map of the next character to read - pub next_pos: BytePos, + crate next_pos: BytePos, /// The absolute offset within the source_map of the current character - pub pos: BytePos, + crate pos: BytePos, /// The current character (which has been read from self.pos) - pub ch: Option, - pub source_file: Lrc, + crate ch: Option, + crate source_file: Lrc, /// Stop reading src at this index. - pub end_src_index: usize, + crate end_src_index: usize, // cached: peek_tok: token::Token, peek_span: Span, @@ -126,7 +126,7 @@ impl<'a> StringReader<'a> { } /// Immutably extract string if found at current position with given delimiters - pub fn peek_delimited(&self, from_ch: char, to_ch: char) -> Option { + fn peek_delimited(&self, from_ch: char, to_ch: char) -> Option { let mut pos = self.pos; let mut idx = self.src_index(pos); let mut ch = char_at(&self.src, idx); @@ -191,7 +191,7 @@ impl<'a> StringReader<'a> { self.fatal_span(self.peek_span, m) } - pub fn emit_fatal_errors(&mut self) { + crate fn emit_fatal_errors(&mut self) { for err in &mut self.fatal_errs { err.emit(); }