Skip to content

Commit ee531da

Browse files
committed
Rollup merge of #56255 - jasonl:update-old-documents, r=michaelwoerister
Update outdated code comments in StringReader For the detection of newlines in the lexer, this is now done in `analyze_source_file.rs`.
2 parents 24e6fb2 + cd20be5 commit ee531da

File tree

1 file changed

+2
-3
lines changed
  • src/libsyntax/parse/lexer

1 file changed

+2
-3
lines changed

src/libsyntax/parse/lexer/mod.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ pub struct StringReader<'a> {
6060
// cache a direct reference to the source text, so that we don't have to
6161
// retrieve it via `self.source_file.src.as_ref().unwrap()` all the time.
6262
src: Lrc<String>,
63-
/// Stack of open delimiters and their spans. Used for error message.
6463
token: token::Token,
6564
span: Span,
6665
/// The raw source span which *does not* take `override_span` into account
6766
span_src_raw: Span,
67+
/// Stack of open delimiters and their spans. Used for error message.
6868
open_braces: Vec<(token::DelimToken, Span)>,
6969
/// The type and spans for all braces
7070
///
@@ -506,8 +506,7 @@ impl<'a> StringReader<'a> {
506506
}
507507
}
508508

509-
/// Advance the StringReader by one character. If a newline is
510-
/// discovered, add it to the SourceFile's list of line start offsets.
509+
/// Advance the StringReader by one character.
511510
crate fn bump(&mut self) {
512511
let next_src_index = self.src_index(self.next_pos);
513512
if next_src_index < self.end_src_index {

0 commit comments

Comments
 (0)