mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-01 07:13:24 +03:00
Forbid type parameters and global paths in macro invocations
This commit is contained in:
@@ -214,7 +214,7 @@ fn mac_result<'a>(path: &ast::Path, ident: Option<Ident>, tts: Vec<TokenTree>, m
|
||||
&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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user