-
Notifications
You must be signed in to change notification settings - Fork 898
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Preserve normalized comments after last list item
- Loading branch information
Showing
4 changed files
with
309 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
// rustfmt-normalize_comments: true | ||
// rustfmt-wrap_comments: true | ||
|
||
pub enum E { | ||
// Expand as needed, numbers should be ascending according to the stage | ||
// through the inclusion pipeline, or according to the descriptions | ||
Variant1, | ||
// Expand as needed, numbers should be ascending according to the stage | ||
// through the inclusion pipeline, or according to the descriptions | ||
Variant2, | ||
// Expand as needed, numbers should be ascending according to the stage | ||
// through the inclusion pipeline, or according to the descriptions | ||
} | ||
|
||
pub enum E2 { | ||
// This can be changed once https://github.com/rust-lang/rustfmt/issues/4854 is fixed | ||
// Expand as needed, numbers should be ascending according to the stage | ||
// through the inclusion pipeline, or according to the descriptions | ||
} | ||
|
||
pub enum E3 { | ||
// Expand as needed, numbers should be ascending according to the stage through the inclusion pipeline, or according to the descriptions | ||
Variant1, | ||
// Expand as needed, numbers should be ascending according to the stage through the inclusion pipeline, or according to the descriptions | ||
Variant2, | ||
// Expand as needed, numbers should be ascending according to the stage through the inclusion pipeline, or according to the descriptions | ||
|
||
} | ||
|
||
pub struct S { | ||
// Expand as needed, numbers should be ascending according to the stage | ||
// through the inclusion pipeline, or according to the descriptions | ||
some_field: usize, | ||
// Expand as needed, numbers should be ascending according to the stage | ||
// through the inclusion pipeline, or according to the descriptions | ||
last_field: usize, | ||
// Expand as needed, numbers should be ascending according to the stage | ||
// through the inclusion pipeline, or according to the descriptions | ||
} | ||
|
||
pub struct S2 { | ||
// This can be changed once https://github.com/rust-lang/rustfmt/issues/4854 is fixed | ||
// Expand as needed, numbers should be ascending according to the stage | ||
// through the inclusion pipeline, or according to the descriptions | ||
} | ||
|
||
pub struct S3 { | ||
// Expand as needed, numbers should be ascending according to the stage through the inclusion pipeline, or according to the descriptions | ||
some_field: usize, | ||
// Expand as needed, numbers should be ascending according to the stage through the inclusion pipeline, or according to the descriptions | ||
last_field: usize, | ||
// Expand as needed, numbers should be ascending according to the stage through the inclusion pipeline, or according to the descriptions | ||
} | ||
|
||
fn foo( | ||
// Expand as needed, numbers should be ascending according to the stage | ||
// through the inclusion pipeline, or according to the descriptions | ||
a: usize, | ||
// Expand as needed, numbers should be ascending according to the stage | ||
// through the inclusion pipeline, or according to the descriptions | ||
b: usize, | ||
// Expand as needed, numbers should be ascending according to the stage | ||
// through the inclusion pipeline, or according to the descriptions | ||
) -> usize { | ||
5 | ||
} | ||
|
||
fn foo2(// Expand as needed, numbers should be ascending according to the stage | ||
// through the inclusion pipeline, or according to the descriptions | ||
) -> usize { | ||
5 | ||
} | ||
|
||
fn foo3( | ||
// Expand as needed, numbers should be ascending according to the stage through the inclusion pipeline, or according to the descriptions | ||
a: usize, | ||
// Expand as needed, numbers should be ascending according to the stage through the inclusion pipeline, or according to the descriptions | ||
b: usize, | ||
// Expand as needed, numbers should be ascending according to the stage through the inclusion pipeline, or according to the descriptions | ||
|
||
) -> usize { | ||
5 | ||
} | ||
|
||
fn main() { | ||
let v = vec![ | ||
// Expand as needed, numbers should be ascending according to the stage | ||
// through the inclusion pipeline, or according to the descriptions | ||
1, | ||
// Expand as needed, numbers should be ascending according to the stage | ||
// through the inclusion pipeline, or according to the descriptions | ||
2, | ||
// Expand as needed, numbers should be ascending according to the stage | ||
// through the inclusion pipeline, or according to the descriptions | ||
]; | ||
|
||
let v2: Vec<i32> = vec![ | ||
// Expand as needed, numbers should be ascending according to the stage | ||
// through the inclusion pipeline, or according to the descriptions | ||
]; | ||
|
||
let v3 = vec![ | ||
// Expand as needed, numbers should be ascending according to the stage through the inclusion pipeline, or according to the descriptions | ||
1, | ||
// Expand as needed, numbers should be ascending according to the stage through the inclusion pipeline, or according to the descriptions | ||
2, | ||
// Expand as needed, numbers should be ascending according to the stage through the inclusion pipeline, or according to the descriptions | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
// rustfmt-normalize_comments: true | ||
|
||
pub enum E { | ||
// Expand as needed, numbers should be ascending according to the stage | ||
// through the inclusion pipeline, or according to the descriptions | ||
Variant1, | ||
// Expand as needed, numbers should be ascending according to the stage | ||
// through the inclusion pipeline, or according to the descriptions | ||
Variant2, | ||
// Expand as needed, numbers should be ascending according to the stage | ||
// through the inclusion pipeline, or according to the descriptions | ||
} | ||
|
||
pub enum E2 { | ||
// This can be changed once https://github.com/rust-lang/rustfmt/issues/4854 is fixed | ||
// Expand as needed, numbers should be ascending according to the stage | ||
// through the inclusion pipeline, or according to the descriptions | ||
} | ||
|
||
pub struct S { | ||
// Expand as needed, numbers should be ascending according to the stage | ||
// through the inclusion pipeline, or according to the descriptions | ||
some_field: usize, | ||
// Expand as needed, numbers should be ascending according to the stage | ||
// through the inclusion pipeline, or according to the descriptions | ||
last_field: usize, | ||
// Expand as needed, numbers should be ascending according to the stage | ||
// through the inclusion pipeline, or according to the descriptions | ||
} | ||
|
||
pub struct S2 { | ||
// This can be changed once https://github.com/rust-lang/rustfmt/issues/4854 is fixed | ||
// Expand as needed, numbers should be ascending according to the stage | ||
// through the inclusion pipeline, or according to the descriptions | ||
} | ||
|
||
fn foo( | ||
// Expand as needed, numbers should be ascending according to the stage | ||
// through the inclusion pipeline, or according to the descriptions | ||
a: usize, | ||
// Expand as needed, numbers should be ascending according to the stage | ||
// through the inclusion pipeline, or according to the descriptions | ||
b: usize, | ||
// Expand as needed, numbers should be ascending according to the stage | ||
// through the inclusion pipeline, or according to the descriptions | ||
) -> usize { | ||
5 | ||
} | ||
|
||
fn foo2(// Expand as needed, numbers should be ascending according to the stage | ||
// through the inclusion pipeline, or according to the descriptions | ||
) -> usize { | ||
5 | ||
} | ||
|
||
fn main() { | ||
let v = vec![ | ||
// Expand as needed, numbers should be ascending according to the stage | ||
// through the inclusion pipeline, or according to the descriptions | ||
1, | ||
// Expand as needed, numbers should be ascending according to the stage | ||
// through the inclusion pipeline, or according to the descriptions | ||
2, | ||
// Expand as needed, numbers should be ascending according to the stage | ||
// through the inclusion pipeline, or according to the descriptions | ||
]; | ||
|
||
let v2: Vec<i32> = vec![ | ||
// Expand as needed, numbers should be ascending according to the stage | ||
// through the inclusion pipeline, or according to the descriptions | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
// rustfmt-normalize_comments: true | ||
// rustfmt-wrap_comments: true | ||
|
||
pub enum E { | ||
// Expand as needed, numbers should be ascending according to the stage | ||
// through the inclusion pipeline, or according to the descriptions | ||
Variant1, | ||
// Expand as needed, numbers should be ascending according to the stage | ||
// through the inclusion pipeline, or according to the descriptions | ||
Variant2, | ||
// Expand as needed, numbers should be ascending according to the stage | ||
// through the inclusion pipeline, or according to the descriptions | ||
} | ||
|
||
pub enum E2 { | ||
// This can be changed once https://github.com/rust-lang/rustfmt/issues/4854 is fixed | ||
// Expand as needed, numbers should be ascending according to the stage | ||
// through the inclusion pipeline, or according to the descriptions | ||
} | ||
|
||
pub enum E3 { | ||
// Expand as needed, numbers should be ascending according to the stage through the inclusion | ||
// pipeline, or according to the descriptions | ||
Variant1, | ||
// Expand as needed, numbers should be ascending according to the stage through the inclusion | ||
// pipeline, or according to the descriptions | ||
Variant2, | ||
// Expand as needed, numbers should be ascending according to the stage through the inclusion | ||
// pipeline, or according to the descriptions | ||
} | ||
|
||
pub struct S { | ||
// Expand as needed, numbers should be ascending according to the stage | ||
// through the inclusion pipeline, or according to the descriptions | ||
some_field: usize, | ||
// Expand as needed, numbers should be ascending according to the stage | ||
// through the inclusion pipeline, or according to the descriptions | ||
last_field: usize, | ||
// Expand as needed, numbers should be ascending according to the stage | ||
// through the inclusion pipeline, or according to the descriptions | ||
} | ||
|
||
pub struct S2 { | ||
// This can be changed once https://github.com/rust-lang/rustfmt/issues/4854 is fixed | ||
// Expand as needed, numbers should be ascending according to the stage | ||
// through the inclusion pipeline, or according to the descriptions | ||
} | ||
|
||
pub struct S3 { | ||
// Expand as needed, numbers should be ascending according to the stage through the inclusion | ||
// pipeline, or according to the descriptions | ||
some_field: usize, | ||
// Expand as needed, numbers should be ascending according to the stage through the inclusion | ||
// pipeline, or according to the descriptions | ||
last_field: usize, | ||
// Expand as needed, numbers should be ascending according to the stage through the inclusion | ||
// pipeline, or according to the descriptions | ||
} | ||
|
||
fn foo( | ||
// Expand as needed, numbers should be ascending according to the stage | ||
// through the inclusion pipeline, or according to the descriptions | ||
a: usize, | ||
// Expand as needed, numbers should be ascending according to the stage | ||
// through the inclusion pipeline, or according to the descriptions | ||
b: usize, | ||
// Expand as needed, numbers should be ascending according to the stage | ||
// through the inclusion pipeline, or according to the descriptions | ||
) -> usize { | ||
5 | ||
} | ||
|
||
fn foo2(// Expand as needed, numbers should be ascending according to the stage | ||
// through the inclusion pipeline, or according to the descriptions | ||
) -> usize { | ||
5 | ||
} | ||
|
||
fn foo3( | ||
// Expand as needed, numbers should be ascending according to the stage through the inclusion | ||
// pipeline, or according to the descriptions | ||
a: usize, | ||
// Expand as needed, numbers should be ascending according to the stage through the inclusion | ||
// pipeline, or according to the descriptions | ||
b: usize, | ||
// Expand as needed, numbers should be ascending according to the stage through the inclusion | ||
// pipeline, or according to the descriptions | ||
) -> usize { | ||
5 | ||
} | ||
|
||
fn main() { | ||
let v = vec![ | ||
// Expand as needed, numbers should be ascending according to the stage | ||
// through the inclusion pipeline, or according to the descriptions | ||
1, | ||
// Expand as needed, numbers should be ascending according to the stage | ||
// through the inclusion pipeline, or according to the descriptions | ||
2, | ||
// Expand as needed, numbers should be ascending according to the stage | ||
// through the inclusion pipeline, or according to the descriptions | ||
]; | ||
|
||
let v2: Vec<i32> = vec![ | ||
// Expand as needed, numbers should be ascending according to the stage | ||
// through the inclusion pipeline, or according to the descriptions | ||
]; | ||
|
||
let v3 = vec![ | ||
// Expand as needed, numbers should be ascending according to the stage through the | ||
// inclusion pipeline, or according to the descriptions | ||
1, | ||
// Expand as needed, numbers should be ascending according to the stage through the | ||
// inclusion pipeline, or according to the descriptions | ||
2, | ||
// Expand as needed, numbers should be ascending according to the stage through the | ||
// inclusion pipeline, or according to the descriptions | ||
]; | ||
} |