]> git.lizzy.rs Git - rust.git/blobdiff - tests/target/multiple.rs
Support single-line functions
[rust.git] / tests / target / multiple.rs
index 9ff3f2cf7a8b8748c7ccf3dc79c984e42018f692..f39a7bcd53da1515e556d657791f4bcb2541958e 100644 (file)
@@ -1,3 +1,4 @@
+// rustfmt-wrap_comments: true
 // Test of lots of random stuff.
 // FIXME split this into multiple, self-contained tests.
 
 mod other;
 
 
-// sfdgfffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffff
+// sfdgfffffffffffffffffffffffffffffffffffffffffffffffffffffff
+// ffffffffffffffffffffffffffffffffffffffffff
 
-fn foo(a: isize, b: u32 /* blah blah */, c: f64) {
-
-}
+fn foo(a: isize, b: u32 /* blah blah */, c: f64) { }
 
 fn foo() -> Box<Write + 'static>
     where 'a: 'b,
@@ -64,8 +64,7 @@ fn qux(a: dadsfa,   // Comment 1
 /// Blah blah blah.
 impl Bar {
     fn foo(&mut self,
-           a: sdfsdfcccccccccccccccccccccccccccccccccccccccccccccccccc, /* commen
-                                                                         * t on a */
+           a: sdfsdfcccccccccccccccccccccccccccccccccccccccccccccccccc, // comment on a
            b: sdfasdfsdfasfs /* closing comment */)
            -> isize {
     }
@@ -76,8 +75,7 @@ pub fn f2(self) {
     }
 
     #[an_attribute]
-    fn f3(self) -> Dog {
-    }
+    fn f3(self) -> Dog { }
 }
 
 /// The `nodes` and `edges` method each return instantiations of
@@ -117,6 +115,8 @@ pub struct Foo<'a, Y: Baz>
     f: SomeType, // Comment beside a field
 }
 
+fn foo(ann: &'a (PpAnn + 'a)) { }
+
 fn main() {
     for i in 0i32..4 {
         println!("{}", i);
@@ -137,4 +137,24 @@ fn main() {
              abcd abcd abcd  abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd \
              abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd \
              abcd abcd";
+    let s = expand(a, b);
+}
+
+fn deconstruct()
+    -> (SocketAddr,
+        Method,
+        Headers,
+        RequestUri,
+        HttpVersion,
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA)
+{
+}
+
+fn deconstruct(foo: Bar)
+               -> (SocketAddr,
+                   Method,
+                   Headers,
+                   RequestUri,
+                   HttpVersion,
+                   AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA) {
 }