]> git.lizzy.rs Git - rust.git/blobdiff - tests/target/structs.rs
Update tests
[rust.git] / tests / target / structs.rs
index c525c5878454f2486924b139d57d63be76189e05..5f471e9a3cdfbf33c7ccddf4b5deeca92363df43 100644 (file)
@@ -41,7 +41,11 @@ pub struct Writebatch<K: Key> {
 
 struct NewType(Type, OtherType);
 
-struct NewInt<T: Copy>(pub i32, SomeType /* inline comment */, T /* sup */);
+struct NewInt<T: Copy>(
+    pub i32,
+    SomeType, // inline comment
+    T,        // sup
+);
 
 struct Qux<
     'a,
@@ -108,7 +112,10 @@ struct Baz {
 }
 
 // Will this be a one-liner?
-struct Tuple(A /* Comment */, B);
+struct Tuple(
+    A, // Comment
+    B,
+);
 
 pub struct State<F: FnMut() -> time::Timespec> {
     now: F,
@@ -157,10 +164,18 @@ struct Foo<T>(
     TTTTTTTTTTTTTTTTTTT,
     UUUUUUUUUUUUUUUUUUU,
 );
-struct Foo<T>(TTTTTTTTTTTTTTTTTT, UUUUUUUUUUUUUUUUUUUUUUUU, TTTTTTTTTTTTTTTTTTT)
+struct Foo<T>(
+    TTTTTTTTTTTTTTTTTT,
+    UUUUUUUUUUUUUUUUUUUUUUUU,
+    TTTTTTTTTTTTTTTTTTT,
+)
 where
     T: PartialEq;
-struct Foo<T>(TTTTTTTTTTTTTTTTT, UUUUUUUUUUUUUUUUUUUUUUUU, TTTTTTTTTTTTTTTTTTTTT)
+struct Foo<T>(
+    TTTTTTTTTTTTTTTTT,
+    UUUUUUUUUUUUUUUUUUUUUUUU,
+    TTTTTTTTTTTTTTTTTTTTT,
+)
 where
     T: PartialEq;
 struct Foo<T>(
@@ -172,7 +187,7 @@ struct Foo<T>(
 where
     T: PartialEq;
 struct Foo<T>(
-    TTTTTTTTTTTTTTTTT, // Foo
+    TTTTTTTTTTTTTTTTT,        // Foo
     UUUUUUUUUUUUUUUUUUUUUUUU, // Bar
     // Baz
     TTTTTTTTTTTTTTTTTTT,
@@ -231,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
+}