-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Give better error for
macro_rules! name!
- Loading branch information
1 parent
15d9ba0
commit ed3b751
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 | ||
|