-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #89221 - aDotInTheVoid:macro-error-1, r=estebank
Give better error for `macro_rules! name!` r? ``@estebank`` ``@rustbot`` modify labels: +A-diagnostics +A-parser
- Loading branch information
Showing
4 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// run-rustfix | ||
#[allow(unused_macros)] | ||
|
||
macro_rules! foo { //~ ERROR macro names aren't followed by a `!` | ||
() => {}; | ||
} | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// run-rustfix | ||
#[allow(unused_macros)] | ||
|
||
macro_rules! foo! { //~ ERROR macro names aren't followed by a `!` | ||
() => {}; | ||
} | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
error: macro names aren't followed by a `!` | ||
--> $DIR/bang-after-name.rs:4:17 | ||
| | ||
LL | macro_rules! foo! { | ||
| ^ help: remove the `!` | ||
|
||
error: aborting due to previous error | ||
|