mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 08:13:41 +00:00
Make StringReader private
After the recent refactorings, we can actually completely hide this type. It should help with #63689.
This commit is contained in:
parent
1baf3ff7e9
commit
30ce15f1fa
@ -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];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user