-
Couldn't load subscription status.
- Fork 962
Closed
Labels
Description
With both normalize_comments and wrap_comments disabled, the following code is mangled:
fn foo {
let f = bar(); // comment for this line
// some comment here to describe the next line
let b = baz();
}Which gets "corrected" to the following:
fn foo {
let f = bar(); // comment for this line
// some comment here to describe the next line
let b = baz();
}Also,
fn foo {
let f = bar(); // comment for this line
// let b = baz();
}Gets equally transformed to
fn foo {
let f = bar(); // comment for this line
// let b = baz();
}Note that I expect neither wrap_comments nor normalize_comments to do this.
Suggested fix: if the comment on the next line starts at index 0, do not try to align them.
See also #2949, which was fixed.
jplatte, Boscop, hudson-ayers, jpindar and q2333gh