diff options
| author | Tyler Mandry <tmandry@gmail.com> | 2020-08-31 19:18:28 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-31 19:18:28 -0700 |
| commit | 90e4bfa952e0908e47b0948be62c02696046680f (patch) | |
| tree | 8de1fbeb07f11e2683c9c7179ade19bc96f81c47 /compiler/rustc_parse/src | |
| parent | e7b4cde330ba95f4b7c369653c98c093453d5ef9 (diff) | |
| parent | 30ce15f1fa763904835c5b3df155964668937683 (diff) | |
| download | rust-90e4bfa952e0908e47b0948be62c02696046680f.tar.gz rust-90e4bfa952e0908e47b0948be62c02696046680f.zip | |
Rollup merge of #76166 - matklad:privatereader, r=petrochenkov
Make `StringReader` private r? @ghost closes #75619
Diffstat (limited to 'compiler/rustc_parse/src')
| -rw-r--r-- | compiler/rustc_parse/src/lexer/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_parse/src/lexer/mod.rs b/compiler/rustc_parse/src/lexer/mod.rs index c4ef35bc30c..1131f00cb42 100644 --- a/compiler/rustc_parse/src/lexer/mod.rs +++ b/compiler/rustc_parse/src/lexer/mod.rs @@ -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, @@ -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>, @@ -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]; |
