about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorAleksey Kladov <aleksey.kladov@gmail.com>2019-07-02 13:44:38 +0300
committerAleksey Kladov <aleksey.kladov@gmail.com>2019-07-04 09:01:37 +0300
commit830ff4a592cf6a5adc0e5482d4294779d7a91177 (patch)
tree02a63590fed1084da3fefbc87764f03d592c1bf0 /src/libsyntax/parse
parentb43eb4235ac43c822d903ad26ed806f34cc1a14a (diff)
downloadrust-830ff4a592cf6a5adc0e5482d4294779d7a91177.tar.gz
rust-830ff4a592cf6a5adc0e5482d4294779d7a91177.zip
remove StringReader::peek
The reader itself doesn't need ability to peek tokens, so it's better
if clients implement this functionality.

This hopefully becomes especially easy once we use iterator interface
for lexer, but this is not too easy at the moment, because of buffered
errors.
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/lexer/mod.rs4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/libsyntax/parse/lexer/mod.rs b/src/libsyntax/parse/lexer/mod.rs
index 49f714e4e46..021b623d509 100644
--- a/src/libsyntax/parse/lexer/mod.rs
+++ b/src/libsyntax/parse/lexer/mod.rs
@@ -142,10 +142,6 @@ impl<'a> StringReader<'a> {
         buffer
     }
 
-    pub fn peek(&self) -> &Token {
-        &self.peek_token
-    }
-
     /// For comments.rs, which hackily pokes into next_pos and ch
     fn new_raw(sess: &'a ParseSess,
                source_file: Lrc<syntax_pos::SourceFile>,