-
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.
resolve: Relax macro resolution consistency check to account for any …
…errors
- Loading branch information
1 parent
2e8a54a
commit ef09ed2
Showing
3 changed files
with
29 additions
and
4 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,12 @@ | ||
macro_rules! define_other_core { | ||
( ) => { | ||
extern crate std as core; | ||
//~^ ERROR macro-expanded `extern crate` items cannot shadow names passed with `--extern` | ||
}; | ||
} | ||
|
||
fn main() { | ||
core::panic!(); | ||
} | ||
|
||
define_other_core!(); |
13 changes: 13 additions & 0 deletions
13
src/test/ui/macros/issue-78325-inconsistent-resolution.stderr
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,13 @@ | ||
error: macro-expanded `extern crate` items cannot shadow names passed with `--extern` | ||
--> $DIR/issue-78325-inconsistent-resolution.rs:3:9 | ||
| | ||
LL | extern crate std as core; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
... | ||
LL | define_other_core!(); | ||
| --------------------- in this macro invocation | ||
| | ||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) | ||
|
||
error: aborting due to previous error | ||
|