Add a test for an opaque macro eagerly expanding its arguments

This commit is contained in:
Vadim Petrochenkov 2019-08-19 23:10:07 +03:00
parent bea0372a1a
commit 1dd56aa304
2 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,18 @@
// Opaque macro can eagerly expand its input without breaking its resolution.
// Regression test for issue #63685.
macro_rules! foo {
() => {
"foo"
};
}
macro_rules! bar {
() => {
foo!() //~ ERROR cannot find macro `foo!` in this scope
};
}
fn main() {
format_args!(bar!());
}

View File

@ -0,0 +1,8 @@
error: cannot find macro `foo!` in this scope
--> $DIR/eager-from-opaque.rs:12:9
|
LL | foo!()
| ^^^
error: aborting due to previous error