diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2019-08-18 01:10:56 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2019-09-30 22:58:22 +0300 |
| commit | 957986d05620238799ae7053d505f742a0c7d640 (patch) | |
| tree | d9d83823f2fd71276724c8fec53f4307f8d926f6 /src/libsyntax/parse/parser/path.rs | |
| parent | 535d4743a4bc4807446cefbc2413e02d53aa0a85 (diff) | |
| download | rust-957986d05620238799ae7053d505f742a0c7d640.tar.gz rust-957986d05620238799ae7053d505f742a0c7d640.zip | |
syntax: Support modern attribute syntax in the `meta` matcher
Diffstat (limited to 'src/libsyntax/parse/parser/path.rs')
| -rw-r--r-- | src/libsyntax/parse/parser/path.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/parse/parser/path.rs b/src/libsyntax/parse/parser/path.rs index 463ae9124ca..ca823991a2e 100644 --- a/src/libsyntax/parse/parser/path.rs +++ b/src/libsyntax/parse/parser/path.rs @@ -114,9 +114,9 @@ impl<'a> Parser<'a> { pub fn parse_path_allowing_meta(&mut self, style: PathStyle) -> PResult<'a, Path> { let meta_ident = match self.token.kind { token::Interpolated(ref nt) => match **nt { - token::NtMeta(ref meta) => match meta.kind { - ast::MetaItemKind::Word => Some(meta.path.clone()), - _ => None, + token::NtMeta(ref item) => match item.tokens.is_empty() { + true => Some(item.path.clone()), + false => None, }, _ => None, }, |
