about summary refs log tree commit diff
path: root/src/librustc_parse/parser/path.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-03-09 11:58:17 +0000
committerbors <bors@rust-lang.org>2020-03-09 11:58:17 +0000
commit3dbade652ed8ebac70f903e01f51cd92c4e4302c (patch)
tree9e1d2f9871ea0024b1657db356742eae8c2b750a /src/librustc_parse/parser/path.rs
parent2cb0b8582ebbf9784db9cec06fff517badbf4553 (diff)
parent7e903f82ff1401445853905083456b9bb0e761cc (diff)
downloadrust-3dbade652ed8ebac70f903e01f51cd92c4e4302c.tar.gz
rust-3dbade652ed8ebac70f903e01f51cd92c4e4302c.zip
Auto merge of #69851 - Centril:rollup-iivxvah, r=Centril
Rollup of 6 pull requests

Successful merges:

 - #69201 (Permit attributes on 'if' expressions)
 - #69685 (unix: Don't override existing SIGSEGV/BUS handlers)
 - #69762 (Ensure that validity only raises validity errors)
 - #69779 (librustc_codegen_llvm: Use slices in preference to 0-terminated strings)
 - #69801 (rustc_parse: Remove `Parser::normalized(_prev)_token`)
 - #69842 (Add more regression tests)

Failed merges:

r? @ghost
Diffstat (limited to 'src/librustc_parse/parser/path.rs')
-rw-r--r--src/librustc_parse/parser/path.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc_parse/parser/path.rs b/src/librustc_parse/parser/path.rs
index 355b6429a74..f88b4fe6ff0 100644
--- a/src/librustc_parse/parser/path.rs
+++ b/src/librustc_parse/parser/path.rs
@@ -240,10 +240,10 @@ impl<'a> Parser<'a> {
     }
 
     pub(super) fn parse_path_segment_ident(&mut self) -> PResult<'a, Ident> {
-        match self.normalized_token.kind {
-            token::Ident(name, _) if name.is_path_segment_keyword() => {
+        match self.token.ident() {
+            Some((ident, false)) if ident.is_path_segment_keyword() => {
                 self.bump();
-                Ok(Ident::new(name, self.normalized_prev_token.span))
+                Ok(ident)
             }
             _ => self.parse_ident(),
         }