Forbid type parameters and global paths in macro invocations
This commit is contained in:
parent
3059bb9e38
commit
e01a2ba274
1 changed files with 1 additions and 1 deletions
|
|
@ -214,7 +214,7 @@ fn expand_mac_invoc<T>(mac: ast::Mac, ident: Option<Ident>, attrs: Vec<ast::Attr
|
|||
&fld.cx.ecfg.features.unwrap());
|
||||
}
|
||||
|
||||
if path.segments.len() > 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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue