Closed
Description
The compiler hangs when compiling the following code.
macro_rules! hang {
() => {
{
#[derive(Clone)]
struct S;
""
}
}
}
fn main() {
format_args!(hang!());
}
This is a regression in 1.20.0. The same code terminates with an error "format argument must be a string literal" in 1.19.0, which is the correct behavior.
Metadata
Metadata
Assignees
Labels
Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Category: This is a bug.Issue: The compiler never terminates, due to infinite loops, deadlock, livelock, etc.High priorityRelevant to the compiler team, which will review and decide on the PR/issue.Performance or correctness regression from one stable version to another.