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
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:
fn main() {
let tup = (1, 2);
let (first, second)/* your pattern here */ = tup;
}
Expectation:
fn main() {
let tup = (1, 2);
let (first, second)/* your pattern here */ = tup;
}
Actual:
fn main() {
let tup = (1, 2);
let (first, second)/* your pattern here */ = tup;
}
The text was updated successfully, but these errors were encountered:
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:
The text was updated successfully, but these errors were encountered: