]> git.lizzy.rs Git - rust.git/blobdiff - tests/target/multiple.rs
Update uses of `rustfmt_skip` to `rustfmt::skip`
[rust.git] / tests / target / multiple.rs
index 0f7ddef007cfb6d339c9820d0ceee56439d57ca5..832567fdf7e08eafe691e3a32282e8700326207d 100644 (file)
@@ -1,7 +1,9 @@
+// rustfmt-normalize_comments: true
+// rustfmt-wrap_comments: true
+// rustfmt-format_strings: true
 // Test of lots of random stuff.
 // FIXME split this into multiple, self-contained tests.
 
-
 #[attr1]
 extern crate foo;
 #[attr2]
 extern crate foo;
 
 use std::cell::*;
-use std::{self, any, ascii, borrow, boxed, char, borrow, boxed, char, borrow, borrow, boxed, char,
-          borrow, boxed, char, borrow, boxed, char, borrow, boxed, char, borrow, boxed, char,
-          borrow, boxed, char, borrow, boxed, char, borrow, boxed, char};
+use std::{
+    self, any, ascii, borrow, borrow, borrow, borrow, borrow, borrow, borrow, borrow, borrow,
+    borrow, borrow, boxed, boxed, boxed, boxed, boxed, boxed, boxed, boxed, boxed, boxed, char,
+    char, char, char, char, char, char, char, char, char,
+};
 
 mod doc;
 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,
-          for<'a> D<'b>: 'a
+where
+    'a: 'b,
+    for<'a> D<'b>: 'a,
 {
     hello!()
 }
 
-fn baz<'a: 'b, // comment on 'a
-       T: SomsssssssssssssssssssssssssssssssssssssssssssssssssssssseType /* comment on T */>
-    (a: A,
-     b: B, // comment on b
-     c: C)
-     -> Bob {
+fn baz<
+    'a: 'b,                                                            // comment on 'a
+    T: SomsssssssssssssssssssssssssssssssssssssssssssssssssssssseType, // comment on T
+>(
+    a: A,
+    b: B, // comment on b
+    c: C,
+) -> Bob {
     #[attr1]
     extern crate foo;
     #[attr2]
@@ -53,7 +58,7 @@ fn baz<'a: 'b, // comment on 'a
     extern crate foo;
 }
 
-#[rustfmt_skip]
+#[rustfmt::skip]
 fn qux(a: dadsfa,   // Comment 1
        b: sdfasdfa, // Comment 2
        c: dsfdsafa) // Comment 3
@@ -63,10 +68,11 @@ fn qux(a: dadsfa,   // Comment 1
 
 /// Blah blah blah.
 impl Bar {
-    fn foo(&mut self,
-           a: sdfsdfcccccccccccccccccccccccccccccccccccccccccccccccccc, // comment on a
-           b: sdfasdfsdfasfs /* closing comment */)
-           -> isize {
+    fn foo(
+        &mut self,
+        a: sdfsdfcccccccccccccccccccccccccccccccccccccccccccccccccc, // comment on a
+        b: sdfasdfsdfasfs,                                           // closing comment
+    ) -> isize {
     }
 
     /// Blah blah blah.
@@ -75,8 +81,7 @@ pub fn f2(self) {
     }
 
     #[an_attribute]
-    fn f3(self) -> Dog {
-    }
+    fn f3(self) -> Dog {}
 }
 
 /// The `nodes` and `edges` method each return instantiations of
@@ -98,7 +103,7 @@ pub trait GraphWalk<'a, N, E> {
 /// A Doc comment
 #[AnAttribute]
 pub struct Foo {
-    #[rustfmt_skip]
+    #[rustfmt::skip]
     f :   SomeType, // Comment beside a field
     f: SomeType, // Comment beside a field
     // Comment on a field
@@ -111,32 +116,65 @@ pub struct Foo {
 
 // With a where clause and generics.
 pub struct Foo<'a, Y: Baz>
-    where X: Whatever
+where
+    X: Whatever,
 {
     f: SomeType, // Comment beside a field
 }
 
-fn foo(ann: &'a (PpAnn + 'a)) {
-}
+fn foo(ann: &'a (PpAnn + 'a)) {}
 
 fn main() {
     for i in 0i32..4 {
         println!("{}", i);
     }
 
-
     while true {
         hello();
     }
 
-    let rc = Cell::new(42usize,
-                       42usize,
-                       Cell::new(42usize,
-                                 remaining_widthremaining_widthremaining_widthremaining_width),
-                       42usize);
-    let rc = RefCell::new(42usize, remaining_width, remaining_width);  // a comment
+    let rc = Cell::new(
+        42usize,
+        42usize,
+        Cell::new(
+            42usize,
+            remaining_widthremaining_widthremaining_widthremaining_width,
+        ),
+        42usize,
+    );
+    let rc = RefCell::new(42usize, remaining_width, remaining_width); // a comment
     let x = "Hello!!!!!!!!! abcd  abcd abcd abcd abcd abcd\n 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 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,
+) {
+}
+
+#[rustfmt::skip]
+mod a{
+fn foo(x:    T) {
+    let x:    T = dfasdf;
+}
 }