about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-08-16 04:16:12 +0000
committerbors <bors@rust-lang.org>2018-08-16 04:16:12 +0000
commitfc323ba160273c3d5867e5920f3861943a49e80a (patch)
tree9b7e6fc676f2c8c23091546e977821da727971fe /src/libsyntax/parse/parser.rs
parent6c712b149229a7968ca2bd56d92241e1ba13dda7 (diff)
parent097c40cf6e1defc2fc49d521374254ee27f5f1fb (diff)
downloadrust-fc323ba160273c3d5867e5920f3861943a49e80a.tar.gz
rust-fc323ba160273c3d5867e5920f3861943a49e80a.zip
Auto merge of #53293 - petrochenkov:gramattr2, r=alexcrichton
syntax: Enforce attribute grammar in the parser

Also fix feature-gating for `unrestricted_attribute_tokens` that was introduced in https://github.com/rust-lang/rust/pull/53270, but was actually broken.

cc https://github.com/rust-lang/rust/pull/50911
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 0e45cacaf38..b1e1cdee2ee 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -825,7 +825,7 @@ impl<'a> Parser<'a> {
     ///
     /// This method will automatically add `tok` to `expected_tokens` if `tok` is not
     /// encountered.
-    fn check(&mut self, tok: &token::Token) -> bool {
+    crate fn check(&mut self, tok: &token::Token) -> bool {
         let is_present = self.token == *tok;
         if !is_present { self.expected_tokens.push(TokenType::Token(tok.clone())); }
         is_present