auto merge of #9753 : alexcrichton/rust/macro-attrs, r=brson
It's unclear to me why these currently aren't allowed, and my best guess is that a long time ago we didn't strip the ast of cfg nodes before syntax expansion. Now that this is done, I'm not certain that we should continue to prohibit this functionality. This is a step in the right direction towards #5605, because now we can add an empty `std::macros` module to the documentation with a bunch of empty macros explaining how they're supposed to be used.
This commit is contained in:
commit
3a70df1d3c
3 changed files with 36 additions and 10 deletions
|
@ -4561,9 +4561,6 @@ impl Parser {
|
|||
|| self.look_ahead(2, |t| *t == token::LPAREN)
|
||||
|| self.look_ahead(2, |t| *t == token::LBRACE)) {
|
||||
// MACRO INVOCATION ITEM
|
||||
if attrs.len() > 0 {
|
||||
self.fatal("attrs on macros are not yet supported");
|
||||
}
|
||||
|
||||
// item macro.
|
||||
let pth = self.parse_path(NoTypesAllowed).path;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue