Closed as not planned
Description
The following macro makes rustfmt as of nightly do bad formatting:
macro_rules! unwrap_some {
($name:ident) => {
let Some($name) = $name else {
panic!();
};
};
}
If you run it once, it moves the panic and the };
one indentation level to the right:
macro_rules! unwrap_some {
($id:ident) => {
let Some($id) = $id else {
panic!();
};
};
}
This process is continued, until you reach this fixpoint:
macro_rules! unwrap_some {
($id:ident) => {
let Some($id) = $id else {
panic!();
};
};
}
I file this bug not because the output is bad style (it is, but that is the purpose of #4914 to figure out), but because the rustfmt output from running it once is not a fixpoint.