-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)A-resolveArea: Name/path resolution done by `rustc_resolve` specificallyArea: Name/path resolution done by `rustc_resolve` specificallyC-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.
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)
Metadata
Metadata
Assignees
Labels
A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)A-resolveArea: Name/path resolution done by `rustc_resolve` specificallyArea: Name/path resolution done by `rustc_resolve` specificallyC-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.