We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug The formatter either removes the comment or moves it inside the branch, which can be misleading.
To Reproduce Steps to reproduce the behavior:
fn foo(x: u1) -> u32 { if x { u32:42 } else { // we take the else branch because u32:0 } }
is formatted to
That can be misleading as the comment is indented to match the return value here. As an attempted workaround,
fn foo(x: u1) -> u32 { if x { u32:42 } // we take the else branch because else { u32:0 } }
is formatted to:
fn foo(x: u1) -> u32 { if x { u32:42 } else { u32:0 } }
Expected behavior Preserve the comment
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
The formatter either removes the comment or moves it inside the branch, which can be misleading.
To Reproduce
Steps to reproduce the behavior:
is formatted to
That can be misleading as the comment is indented to match the return value here. As an attempted workaround,
is formatted to:
Expected behavior
Preserve the comment
The text was updated successfully, but these errors were encountered: