From e01a2ba2743bb72d86bf96df72af98ab06ad47eb Mon Sep 17 00:00:00 2001 From: Jeffrey Seyfried Date: Mon, 27 Jun 2016 03:15:06 +0000 Subject: Forbid type parameters and global paths in macro invocations --- src/libsyntax/ext/expand.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libsyntax') diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs index 5beb4937207..89e346be944 100644 --- a/src/libsyntax/ext/expand.rs +++ b/src/libsyntax/ext/expand.rs @@ -214,7 +214,7 @@ fn expand_mac_invoc(mac: ast::Mac, ident: Option, attrs: Vec 1 { + if path.segments.len() > 1 || path.global || !path.segments[0].parameters.is_empty() { fld.cx.span_err(path.span, "expected macro name without module separators"); return None; } -- cgit 1.4.1-3-g733a5