-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ad27045
commit 3a3efc5
Showing
3 changed files
with
44 additions
and
5 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,7 @@ | ||
#[crate_type = foo!()] //~ ERROR attribute value must be a literal | ||
//~^ ERROR cannot find macro `foo` in this scope | ||
|
||
macro_rules! foo {} //~ ERROR unexpected end of macro invocation | ||
|
||
|
||
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,26 @@ | ||
error: attribute value must be a literal | ||
--> $DIR/empty-expansion-macro.rs:1:1 | ||
| | ||
LL | #[crate_type = foo!()] | ||
| ^^^^^^^^^^^^^^ | ||
|
||
error: unexpected end of macro invocation | ||
--> $DIR/empty-expansion-macro.rs:4:1 | ||
| | ||
LL | macro_rules! foo {} | ||
| ^^^^^^^^^^^^^^^^^^^ missing tokens in macro arguments | ||
|
||
error: cannot find macro `foo` in this scope | ||
--> $DIR/empty-expansion-macro.rs:1:16 | ||
| | ||
LL | #[crate_type = foo!()] | ||
| ^^^ consider moving the definition of `foo` before this call | ||
| | ||
note: a macro with the same name exists, but it appears later | ||
--> $DIR/empty-expansion-macro.rs:4:14 | ||
| | ||
LL | macro_rules! foo {} | ||
| ^^^ | ||
|
||
error: aborting due to 3 previous errors | ||
|