-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ICE on wrong macro #51173
Labels
A-macros
Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
C-bug
Category: This is a bug.
glacier
ICE tracked in rust-lang/glacier.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
running with
|
Here's a smaller reproducer. macro_rules! bug {
( $doc:expr ) => { #[doc = $doc] enum Bug {} }
}
bug! { (stringify!(bug)) }
fn main() { } Interestingly, this similar example compiles. macro_rules! working {
( $doc:expr, $item:item ) => { #[doc = $doc] $item }
}
working! {
stringify!(Working),
enum Working { }
}
fn main() {} |
Smaller reproducer reproduces in 2020, cc @petrochenkov |
Duplicate of #55414. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-macros
Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
C-bug
Category: This is a bug.
glacier
ICE tracked in rust-lang/glacier.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Repro:
Compiling the following:
The text was updated successfully, but these errors were encountered: