about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2018-11-29 13:10:43 +0100
committerGitHub <noreply@github.com>2018-11-29 13:10:43 +0100
commitd1b0681bd79d1be15858ed5adc1e6789ab854cdf (patch)
treec131c4ebe025b2954ac608ab0006c888d4d36640 /src/libsyntax/parse
parent1b7da84e9d2c29d03d34f9b6804af67f51e41a6b (diff)
parentcd20be50912170842689e4f936c31c5a28184432 (diff)
downloadrust-d1b0681bd79d1be15858ed5adc1e6789ab854cdf.tar.gz
rust-d1b0681bd79d1be15858ed5adc1e6789ab854cdf.zip
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`.
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/lexer/mod.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libsyntax/parse/lexer/mod.rs b/src/libsyntax/parse/lexer/mod.rs
index 0584cd5a3df..c90c62c13f9 100644
--- a/src/libsyntax/parse/lexer/mod.rs
+++ b/src/libsyntax/parse/lexer/mod.rs
@@ -60,11 +60,11 @@ pub struct StringReader<'a> {
     // cache a direct reference to the source text, so that we don't have to
     // retrieve it via `self.source_file.src.as_ref().unwrap()` all the time.
     src: Lrc<String>,
-    /// Stack of open delimiters and their spans. Used for error message.
     token: token::Token,
     span: Span,
     /// The raw source span which *does not* take `override_span` into account
     span_src_raw: Span,
+    /// Stack of open delimiters and their spans. Used for error message.
     open_braces: Vec<(token::DelimToken, Span)>,
     /// The type and spans for all braces
     ///
@@ -506,8 +506,7 @@ impl<'a> StringReader<'a> {
         }
     }
 
-    /// Advance the StringReader by one character. If a newline is
-    /// discovered, add it to the SourceFile's list of line start offsets.
+    /// Advance the StringReader by one character.
     crate fn bump(&mut self) {
         let next_src_index = self.src_index(self.next_pos);
         if next_src_index < self.end_src_index {