-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Closed
Copy link
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️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.requires-debug-assertionsThis issue requires a build of rustc or tooling with debug-assertions in some wayThis issue requires a build of rustc or tooling with debug-assertions in some way
Description
Code
macro_rules! make_macro {
($macro_name:tt $($matcher:tt)*) => {
#[macro_export]
macro_rules! $macro_name [T; 0]
}
}
make_macro! {
(<= $($matcher)* =>) => {};
}
Meta
rustc --version --verbose
:
f967532a47eb728ada44473a5c4c2eca1a45fe30
Error output
The problem seems to be this:
error: macros that expand to items must be delimited with braces or followed by a semicolon (note how the `r` is green)
--> 92998.rs:4:22
|
4 | macro_rules! $macro_name [T; 0]
| ^^^^^^^^^^^
|
help: change the delimiters to curly braces
|
4 | macro_rules! {} [T; 0]
| ~
help: add a semicolon
|
4 | macro_rules! $macro_name; [T; 0]
| +
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️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.requires-debug-assertionsThis issue requires a build of rustc or tooling with debug-assertions in some wayThis issue requires a build of rustc or tooling with debug-assertions in some way