From a1885cdba38a63448ceec02f951ddc0844d0ff38 Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Mon, 13 May 2019 22:46:20 +0300 Subject: Restore the old behavior of the rustdoc keyword check + Fix rebase --- src/libsyntax/ext/tt/macro_rules.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/libsyntax/ext') diff --git a/src/libsyntax/ext/tt/macro_rules.rs b/src/libsyntax/ext/tt/macro_rules.rs index 8adee4be75f..37c49112dca 100644 --- a/src/libsyntax/ext/tt/macro_rules.rs +++ b/src/libsyntax/ext/tt/macro_rules.rs @@ -13,7 +13,7 @@ use crate::parse::{Directory, ParseSess}; use crate::parse::parser::Parser; use crate::parse::token::{self, NtTT}; use crate::parse::token::Token::*; -use crate::symbol::{Symbol, keywords, sym}; +use crate::symbol::{Symbol, kw, sym}; use crate::tokenstream::{DelimSpan, TokenStream, TokenTree}; use errors::FatalError; @@ -1046,8 +1046,8 @@ fn is_in_follow(tok: "ed::TokenTree, frag: &str) -> IsInFollow { match *tok { TokenTree::Token(_, ref tok) => match *tok { FatArrow | Comma | Eq | BinOp(token::Or) => IsInFollow::Yes, - Ident(i, false) if i.name == keywords::If.name() || - i.name == keywords::In.name() => IsInFollow::Yes, + Ident(i, false) if i.name == kw::If || + i.name == kw::In => IsInFollow::Yes, _ => IsInFollow::No(tokens), }, _ => IsInFollow::No(tokens), @@ -1064,8 +1064,8 @@ fn is_in_follow(tok: "ed::TokenTree, frag: &str) -> IsInFollow { OpenDelim(token::DelimToken::Bracket) | Comma | FatArrow | Colon | Eq | Gt | BinOp(token::Shr) | Semi | BinOp(token::Or) => IsInFollow::Yes, - Ident(i, false) if i.name == keywords::As.name() || - i.name == keywords::Where.name() => IsInFollow::Yes, + Ident(i, false) if i.name == kw::As || + i.name == kw::Where => IsInFollow::Yes, _ => IsInFollow::No(tokens), }, TokenTree::MetaVarDecl(_, _, frag) if frag.name == sym::block => @@ -1092,7 +1092,7 @@ fn is_in_follow(tok: "ed::TokenTree, frag: &str) -> IsInFollow { match *tok { TokenTree::Token(_, ref tok) => match *tok { Comma => IsInFollow::Yes, - Ident(i, is_raw) if is_raw || i.name != keywords::Priv.name() => + Ident(i, is_raw) if is_raw || i.name != kw::Priv => IsInFollow::Yes, ref tok => if tok.can_begin_type() { IsInFollow::Yes -- cgit 1.4.1-3-g733a5