Closed
Description
This code (playpen) compiles on stable but not on nightly and beta:
macro_rules! foo {
() => {
"foo"
};
}
macro_rules! bar {
() => {
foo!()
};
}
fn main() {
println!(bar!());
}
Standard Error
Compiling playground v0.0.1 (/playground)
error: cannot find macro `foo!` in this scope
--> src/main.rs:9:9
|
9 | foo!()
| ^^^
warning: unused macro definition
--> src/main.rs:1:1
|
1 | / macro_rules! foo {
2 | | () => {
3 | | "foo"
4 | | };
5 | | }
| |_^
|
= note: `#[warn(unused_macros)]` on by default
error: aborting due to previous error
error: Could not compile `playground`.
To learn more, run the command again with --verbose.
Edit: Removed concat!
macro
Originally posted by @lzutao in #63460 (comment)