forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
resolve: Turn the binding from
#[macro_export]
into a proper Import
- Loading branch information
1 parent
637bfe6
commit 8431751
Showing
10 changed files
with
96 additions
and
61 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
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
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
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 |
---|---|---|
@@ -1,7 +1,17 @@ | ||
#[macro_export] | ||
macro_rules! foo { ($i:ident) => {} } | ||
macro_rules! foo { () => {} } | ||
|
||
#[macro_export] | ||
macro_rules! foo { () => {} } //~ ERROR the name `foo` is defined multiple times | ||
|
||
mod inner1 { | ||
#[macro_export] | ||
macro_rules! bar { () => {} } | ||
} | ||
|
||
mod inner2 { | ||
#[macro_export] | ||
macro_rules! bar { () => {} } //~ ERROR the name `bar` is defined multiple times | ||
} | ||
|
||
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 |
---|---|---|
@@ -1,14 +1,25 @@ | ||
error[E0428]: the name `foo` is defined multiple times | ||
--> $DIR/issue-38715.rs:5:1 | ||
| | ||
LL | macro_rules! foo { ($i:ident) => {} } | ||
LL | macro_rules! foo { () => {} } | ||
| ---------------- previous definition of the macro `foo` here | ||
... | ||
LL | macro_rules! foo { () => {} } | ||
| ^^^^^^^^^^^^^^^^ `foo` redefined here | ||
| | ||
= note: `foo` must be defined only once in the macro namespace of this module | ||
|
||
error: aborting due to previous error | ||
error[E0428]: the name `bar` is defined multiple times | ||
--> $DIR/issue-38715.rs:14:5 | ||
| | ||
LL | macro_rules! bar { () => {} } | ||
| ---------------- previous definition of the macro `bar` here | ||
... | ||
LL | macro_rules! bar { () => {} } | ||
| ^^^^^^^^^^^^^^^^ `bar` redefined here | ||
| | ||
= note: `bar` must be defined only once in the macro namespace of this module | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0428`. |
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