about summary refs log tree commit diff
path: root/src/libsyntax/parse/lexer
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-05-18 10:57:05 +0000
committerbors <bors@rust-lang.org>2018-05-18 10:57:05 +0000
commitdf40e61382a2cba0be621fdabb9971ce3475e9a7 (patch)
tree7bdf66599659eccd8b03f5921c2e5087efe94008 /src/libsyntax/parse/lexer
parentfd18d2537ddcffb24b3739393b085ed28dfc340e (diff)
parentd8bbc1ee1ad44e9c7bd93c8d59103eacd0ed36e8 (diff)
downloadrust-df40e61382a2cba0be621fdabb9971ce3475e9a7.tar.gz
rust-df40e61382a2cba0be621fdabb9971ce3475e9a7.zip
Auto merge of #50307 - petrochenkov:keyhyg2, r=nikomatsakis
Implement edition hygiene for keywords

Determine "keywordness" of an identifier in its hygienic context.
cc https://github.com/rust-lang/rust/pull/49611

I've resurrected `proc` as an Edition-2015-only keyword for testing purposes, but it should probably be buried again. EDIT: `proc` is removed again.
Diffstat (limited to 'src/libsyntax/parse/lexer')
-rw-r--r--src/libsyntax/parse/lexer/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/parse/lexer/mod.rs b/src/libsyntax/parse/lexer/mod.rs
index a0434fe6616..bbece1ee5e3 100644
--- a/src/libsyntax/parse/lexer/mod.rs
+++ b/src/libsyntax/parse/lexer/mod.rs
@@ -1128,7 +1128,7 @@ impl<'a> StringReader<'a> {
                 return Ok(self.with_str_from(start, |string| {
                     // FIXME: perform NFKC normalization here. (Issue #2253)
                     let ident = self.mk_ident(string);
-                    if is_raw_ident && (token::is_path_segment_keyword(ident) ||
+                    if is_raw_ident && (ident.is_path_segment_keyword() ||
                                         ident.name == keywords::Underscore.name()) {
                         self.fatal_span_(raw_start, self.pos,
                             &format!("`r#{}` is not currently supported.", ident.name)