You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am observing unexpected formatting of macro bodies when the macro emits a block wrapped in curly braces and hard_tabs = true.
To Reproduce
Run the following macro definition through rustfmt with hard_tabs = true:
Input:
macro_rules! example {() => {{let x = 5;Ok(x)}};}
Output:
macro_rules! example {() => {{let x = 5;Ok(x)}};}
The output has an extra level indentation at the closing curly braces. This does not happen when hard_tabs = false or when the macro does not emit an enclosing block.
Expected behavior
#[macro_export]macro_rules! example {() => {{let x = 5;Ok(x)}};}
Meta
rustfmt version: 1.4.24-stable
From where did you install rustfmt?: rustup
How do you run rustfmt: rustfmt
The text was updated successfully, but these errors were encountered:
Describe the bug
I am observing unexpected formatting of macro bodies when the macro emits a block wrapped in curly braces and
hard_tabs = true
.To Reproduce
Run the following macro definition through rustfmt with
hard_tabs = true
:Input:
Output:
The output has an extra level indentation at the closing curly braces. This does not happen when
hard_tabs = false
or when the macro does not emit an enclosing block.Expected behavior
Meta
rustfmt
The text was updated successfully, but these errors were encountered: