diff --git a/tests/source/structs.rs b/tests/source/structs.rs index bd507667f251..e0e27f538fc3 100644 --- a/tests/source/structs.rs +++ b/tests/source/structs.rs @@ -209,3 +209,26 @@ fn foo() { convex_shape.set_point(2, &Vector2f { x: 450.0, y: 100.0 }); convex_shape.set_point(3, &Vector2f { x: 580.0, y: 150.0 }); } + +struct Foo { + aaaaa: u32, // a + + b: u32, // b + cc: u32, // cc + + xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx: u32, // 1 + yy: u32, // comment2 + zzz: u32, // comment3 + + aaaaaa: u32, // comment4 + bb: u32, // comment5 + // separate + dd: u32, // comment7 + c: u32, // comment6 + + aaaaaaa: u32, /* multi + * line + * comment + */ + b: u32, // hi +} diff --git a/tests/target/configs-struct_field_align_threshold-20.rs b/tests/target/configs-struct_field_align_threshold-20.rs index 509bcbf6d64e..08210b2ee3c7 100644 --- a/tests/target/configs-struct_field_align_threshold-20.rs +++ b/tests/target/configs-struct_field_align_threshold-20.rs @@ -76,7 +76,7 @@ struct NewType(Type, OtherType); struct NewInt( pub i32, SomeType, // inline comment - T, // sup + T, // sup ); struct Qux< @@ -219,7 +219,7 @@ struct Foo( where T: PartialEq; struct Foo( - TTTTTTTTTTTTTTTTT, // Foo + TTTTTTTTTTTTTTTTT, // Foo UUUUUUUUUUUUUUUUUUUUUUUU, // Bar // Baz TTTTTTTTTTTTTTTTTTT, diff --git a/tests/target/enum.rs b/tests/target/enum.rs index 14b9910687d0..9bba8840581a 100644 --- a/tests/target/enum.rs +++ b/tests/target/enum.rs @@ -88,7 +88,7 @@ where I: Iterator, { // Pre Comment - Left { list: I, root: T }, // Post-comment + Left { list: I, root: T }, // Post-comment Right { list: I, root: T }, // Post Comment } diff --git a/tests/target/fn-args-with-last-line-comment.rs b/tests/target/fn-args-with-last-line-comment.rs index 2ffb3909b742..ef40e040ea8e 100644 --- a/tests/target/fn-args-with-last-line-comment.rs +++ b/tests/target/fn-args-with-last-line-comment.rs @@ -3,8 +3,8 @@ pub trait X { fn a(&self) -> &'static str; fn bcd( &self, - c: &str, // comment on this arg - d: u16, // comment on this arg + c: &str, // comment on this arg + d: u16, // comment on this arg e: &Vec, // comment on this arg ) -> Box; } diff --git a/tests/target/fn-simple.rs b/tests/target/fn-simple.rs index 76776672ca8c..e150973a67d0 100644 --- a/tests/target/fn-simple.rs +++ b/tests/target/fn-simple.rs @@ -2,7 +2,7 @@ fn simple( // pre-comment on a function!? - i: i32, // yes, it's possible! + i: i32, // yes, it's possible! response: NoWay, // hose ) { fn op( diff --git a/tests/target/macros.rs b/tests/target/macros.rs index 1f482075df47..d784c26ce1c8 100644 --- a/tests/target/macros.rs +++ b/tests/target/macros.rs @@ -29,7 +29,7 @@ fn main() { kaas!( // comments a, // post macro - b // another + b // another ); trailingcomma!(a, b, c,); diff --git a/tests/target/multiple.rs b/tests/target/multiple.rs index d8dea8896f2b..bf12854c9880 100644 --- a/tests/target/multiple.rs +++ b/tests/target/multiple.rs @@ -39,7 +39,7 @@ where } fn baz< - 'a: 'b, // comment on 'a + 'a: 'b, // comment on 'a T: SomsssssssssssssssssssssssssssssssssssssssssssssssssssssseType, // comment on T >( a: A, @@ -71,7 +71,7 @@ impl Bar { fn foo( &mut self, a: sdfsdfcccccccccccccccccccccccccccccccccccccccccccccccccc, // comment on a - b: sdfasdfsdfasfs, // closing comment + b: sdfasdfsdfasfs, // closing comment ) -> isize { } diff --git a/tests/target/structs.rs b/tests/target/structs.rs index dcb21bb195b5..5f471e9a3cdf 100644 --- a/tests/target/structs.rs +++ b/tests/target/structs.rs @@ -44,7 +44,7 @@ struct NewType(Type, OtherType); struct NewInt( pub i32, SomeType, // inline comment - T, // sup + T, // sup ); struct Qux< @@ -187,7 +187,7 @@ struct Foo( where T: PartialEq; struct Foo( - TTTTTTTTTTTTTTTTT, // Foo + TTTTTTTTTTTTTTTTT, // Foo UUUUUUUUUUUUUUUUUUUUUUUU, // Bar // Baz TTTTTTTTTTTTTTTTTTT, @@ -246,3 +246,26 @@ fn foo() { convex_shape.set_point(2, &Vector2f { x: 450.0, y: 100.0 }); convex_shape.set_point(3, &Vector2f { x: 580.0, y: 150.0 }); } + +struct Foo { + aaaaa: u32, // a + + b: u32, // b + cc: u32, // cc + + xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx: u32, // 1 + yy: u32, // comment2 + zzz: u32, // comment3 + + aaaaaa: u32, // comment4 + bb: u32, // comment5 + // separate + dd: u32, // comment7 + c: u32, // comment6 + + aaaaaaa: u32, /* multi + * line + * comment + * */ + b: u32, // hi +}