Skip to content

Commit

Permalink
Make StringReader private
Browse files Browse the repository at this point in the history
After the recent refactorings, we can actually completely hide this
type. It should help with #63689.
  • Loading branch information
matklad committed Aug 31, 2020
1 parent 1baf3ff commit 30ce15f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions compiler/rustc_parse/src/lexer/mod.rs
Expand Up @@ -27,7 +27,7 @@ pub struct UnmatchedBrace {
pub candidate_span: Option<Span>,
}

pub struct StringReader<'a> {
crate struct StringReader<'a> {
sess: &'a ParseSess,
/// Initial position, read-only.
start_pos: BytePos,
Expand All @@ -41,7 +41,7 @@ pub struct StringReader<'a> {
}

impl<'a> StringReader<'a> {
pub fn new(
crate fn new(
sess: &'a ParseSess,
source_file: Lrc<rustc_span::SourceFile>,
override_span: Option<Span>,
Expand All @@ -66,7 +66,7 @@ impl<'a> StringReader<'a> {
}

/// Returns the next token, including trivia like whitespace or comments.
pub fn next_token(&mut self) -> Token {
fn next_token(&mut self) -> Token {
let start_src_index = self.src_index(self.pos);
let text: &str = &self.src[start_src_index..self.end_src_index];

Expand Down

0 comments on commit 30ce15f

Please sign in to comment.