]> git.lizzy.rs Git - rust.git/blobdiff - tests/target/fn.rs
Update uses of `rustfmt_skip` to `rustfmt::skip`
[rust.git] / tests / target / fn.rs
index 9ba150d6115d133a1e21cfc81ed7d334d0b10022..66a6e9082de2ffea1ea3f41775792cc40afe60ca 100644 (file)
@@ -2,24 +2,35 @@
 
 fn foo(a: AAAA, b: BBB, c: CCC) -> RetType {}
 
-fn foo(a: AAAA, b: BBB /* some, weird, inline comment */, c: CCC) -> RetType where T: Blah {}
+fn foo(a: AAAA, b: BBB /* some, weird, inline comment */, c: CCC) -> RetType
+where
+    T: Blah,
+{
+}
 
-fn foo(a: AAA /* (comment) */) where T: Blah {}
+fn foo(a: AAA /* (comment) */)
+where
+    T: Blah,
+{
+}
 
-fn foo(a: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,
-       b: BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB)
-       -> RetType
-    where T: Blah
+fn foo(
+    a: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,
+    b: BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB,
+) -> RetType
+where
+    T: Blah,
 {
 
 }
 
-
-fn foo<U, T>(a: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,
-             b: BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB)
-             -> RetType
-    where T: Blah,
-          U: dsfasdfasdfasd
+fn foo<U, T>(
+    a: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,
+    b: BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB,
+) -> RetType
+where
+    T: Blah,
+    U: dsfasdfasdfasd,
 {
 
 }
@@ -27,21 +38,27 @@ fn foo<U, T>(a: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,
 fn foo<U: Fn(A) -> B /* paren inside generics */>() {}
 
 impl Foo {
-    fn with_no_errors<T, F>(&mut self, f: F) -> T where F: FnOnce(&mut Resolver) -> T {}
+    fn with_no_errors<T, F>(&mut self, f: F) -> T
+    where
+        F: FnOnce(&mut Resolver) -> T,
+    {
+    }
 
     fn foo(mut self, mut bar: u32) {}
 
     fn bar(self, mut bazz: u32) {}
 }
 
-pub fn render<'a,
-              N: Clone + 'a,
-              E: Clone + 'a,
-              G: Labeller<'a, N, E> + GraphWalk<'a, N, E>,
-              W: Write>
-    (g: &'a G,
-     w: &mut W)
-     -> io::Result<()> {
+pub fn render<
+    'a,
+    N: Clone + 'a,
+    E: Clone + 'a,
+    G: Labeller<'a, N, E> + GraphWalk<'a, N, E>,
+    W: Write,
+>(
+    g: &'a G,
+    w: &mut W,
+) -> io::Result<()> {
     render_opts(g, w, &[])
 }
 
@@ -75,31 +92,31 @@ fn inner() {
     x
 }
 
-#[cfg_attr(rustfmt, rustfmt_skip)]
+#[cfg_attr(rustfmt, rustfmt::skip)]
 fn foo(a: i32) -> i32 {
     // comment
     if a > 0 { 1 } else { 2 }
 }
 
-fn ______________________baz(a: i32)
-    ->
-        *mut ::std::option::Option<extern "C" fn(arg1: i32,
-                                                _____________________a: i32,
-                                                arg3: i32)
-                                    -> ()> {
+fn ______________________baz(
+    a: i32,
+) -> *mut ::std::option::Option<
+    extern "C" fn(arg1: i32, _____________________a: i32, arg3: i32) -> (),
+> {
 }
 
-pub fn check_path<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
-                            path: &hir::Path,
-                            id: ast::NodeId,
-                            cb: &mut FnMut(DefId, Span, &Option<&Stability>, &Option<Depecation>)) {
+pub fn check_path<'a, 'tcx>(
+    tcx: TyCtxt<'a, 'tcx, 'tcx>,
+    path: &hir::Path,
+    id: ast::NodeId,
+    cb: &mut FnMut(DefId, Span, &Option<&Stability>, &Option<Depecation>),
+) {
 }
 
-pub fn check_path<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
-                            path: &hir::Path,
-                            id: ast::NodeId,
-                            cb: &mut FnMut(DefId,
-                                           Span,
-                                           &Option<&Stability>,
-                                           &Option<Deprecation>)) {
+pub fn check_path<'a, 'tcx>(
+    tcx: TyCtxt<'a, 'tcx, 'tcx>,
+    path: &hir::Path,
+    id: ast::NodeId,
+    cb: &mut FnMut(DefId, Span, &Option<&Stability>, &Option<Deprecation>),
+) {
 }