about summary refs log tree commit diff
path: root/src/libsyntax/ext
diff options
context:
space:
mode:
authorCorey Farwell <coreyf@rwell.org>2017-04-05 23:51:43 -0400
committerGitHub <noreply@github.com>2017-04-05 23:51:43 -0400
commit89b364d687b7a3d16fb9553f7b5b0c034c406d91 (patch)
tree54e5bab4924318f488d3a81d38d839ee1f1d3d1b /src/libsyntax/ext
parente4a62109c9694263002c4c80cd2c13cf7913a15e (diff)
parent6a9448b523b95dbc850e856508342644fc17db45 (diff)
Rollup merge of #41050 - jseyfried:fix_derive_parsing, r=petrochenkov
macros: fix bug parsing `#[derive]` invocations

Fixes #40962 (introduced in #40346).
r? @nrc
Diffstat (limited to 'src/libsyntax/ext')
-rw-r--r--src/libsyntax/ext/derive.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libsyntax/ext/derive.rs b/src/libsyntax/ext/derive.rs
index c79040424f6..e7c5d8278d9 100644
--- a/src/libsyntax/ext/derive.rs
+++ b/src/libsyntax/ext/derive.rs
@@ -26,7 +26,8 @@ pub fn collect_derives(cx: &mut ExtCtxt, attrs: &mut Vec<ast::Attribute>) -> Vec
             return true;
         }
 
-        match attr.parse_list(cx.parse_sess, |parser| parser.parse_path(PathStyle::Mod)) {
+        match attr.parse_list(cx.parse_sess,
+                              |parser| parser.parse_path_allowing_meta(PathStyle::Mod)) {
             Ok(ref traits) if traits.is_empty() => {
                 cx.span_warn(attr.span, "empty trait list in `derive`");
                 false