Skip to content

Commit e01a2ba

Browse files
committed
Forbid type parameters and global paths in macro invocations
1 parent 3059bb9 commit e01a2ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libsyntax/ext/expand.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ fn expand_mac_invoc<T>(mac: ast::Mac, ident: Option<Ident>, attrs: Vec<ast::Attr
214214
&fld.cx.ecfg.features.unwrap());
215215
}
216216

217-
if path.segments.len() > 1 {
217+
if path.segments.len() > 1 || path.global || !path.segments[0].parameters.is_empty() {
218218
fld.cx.span_err(path.span, "expected macro name without module separators");
219219
return None;
220220
}

0 commit comments

Comments
 (0)