about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-05-31 20:44:04 +0000
committerbors <bors@rust-lang.org>2018-05-31 20:44:04 +0000
commit1ffb321477d85fb3c95a0be2a0cd89c04dff0d8d (patch)
tree2bf9c53f13bfbcc7549f2e2a2e2ab7ca92ca59e3 /src/libsyntax/parse
parent5342d40c1f49ef82ebff4c30fdad9f3b6fd339c1 (diff)
parent7552c2ea6485a173a3c8241afc82e8fefe061885 (diff)
downloadrust-1ffb321477d85fb3c95a0be2a0cd89c04dff0d8d.tar.gz
rust-1ffb321477d85fb3c95a0be2a0cd89c04dff0d8d.zip
Auto merge of #51257 - GuillaumeGomez:rollup, r=GuillaumeGomez
Rollup of 7 pull requests

Successful merges:

 - #49546 (Stabilize short error format)
 - #51123 (Update build instructions)
 - #51146 (typeck: Do not pass the field check on field error)
 - #51193 (Fixes some style issues in rustdoc "implementations on Foreign types")
 - #51213 (fs: copy: Use File::set_permissions instead of fs::set_permissions)
 - #51227 (mod.rs isn't beautiful)
 - #51240 (Two minor parsing tweaks)

Failed merges:
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/lexer/mod.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/libsyntax/parse/lexer/mod.rs b/src/libsyntax/parse/lexer/mod.rs
index c396fb0fbc0..04e180cd053 100644
--- a/src/libsyntax/parse/lexer/mod.rs
+++ b/src/libsyntax/parse/lexer/mod.rs
@@ -516,6 +516,7 @@ impl<'a> StringReader<'a> {
             return None;
         }
         let start = self.pos;
+        self.bump();
         while ident_continue(self.ch) {
             self.bump();
         }
@@ -1155,6 +1156,7 @@ impl<'a> StringReader<'a> {
                 }
 
                 let start = self.pos;
+                self.bump();
                 while ident_continue(self.ch) {
                     self.bump();
                 }
@@ -1300,11 +1302,7 @@ impl<'a> StringReader<'a> {
                     }
                     '-' => {
                         self.bump();
-                        match self.ch.unwrap_or('\x00') {
-                            _ => {
-                                Ok(token::LArrow)
-                            }
-                        }
+                        Ok(token::LArrow)
                     }
                     _ => {
                         Ok(token::Lt)