Open mfurak opened 2 years ago
Thanks for reaching out!
rustfmt doesn't currently handle comments between the pattern and the =
in let statements, and out of an abundance of caution doesn't reformat the let statement because doing so would result in losing the comment. For now I'd encourage you not to place comments in that position.
let statements
are represented by ast::Local AST nodes, and for anyone interested in working on this you should look into the Rewrite impl for ast::Local
When running the
rustfmt
on a line that contains a block comment, the lines doesn't get formatted at all. My expectation is that the line gets formatted correctly as if the comment block wasn't there.rustfmt
version:rustfmt 1.5.1-stable
Test case:Expectation:
Actual: