about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2024-05-29 14:25:55 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2024-05-31 15:56:45 +1000
commit780a91786ec73a0ec1d2847e860f2d71dd7704fe (patch)
treedd1ea0522f17fb2a6a97931c9c07265269ef49d7
parent72800d3b896a5733d08213ec357f3a875f1f5b0e (diff)
downloadrust-780a91786ec73a0ec1d2847e860f2d71dd7704fe.tar.gz
rust-780a91786ec73a0ec1d2847e860f2d71dd7704fe.zip
Run rustfmt on `tests/codegen-units/`.
-rw-r--r--rustfmt.toml1
-rw-r--r--tests/codegen-units/item-collection/auxiliary/cgu_export_trait_method.rs38
-rw-r--r--tests/codegen-units/item-collection/auxiliary/cgu_extern_closures.rs9
-rw-r--r--tests/codegen-units/item-collection/cross-crate-closures.rs1
-rw-r--r--tests/codegen-units/item-collection/cross-crate-trait-method.rs2
-rw-r--r--tests/codegen-units/item-collection/drop_in_place_intrinsic.rs1
-rw-r--r--tests/codegen-units/item-collection/function-as-argument.rs1
-rw-r--r--tests/codegen-units/item-collection/generic-drop-glue.rs13
-rw-r--r--tests/codegen-units/item-collection/generic-impl.rs13
-rw-r--r--tests/codegen-units/item-collection/instantiation-through-vtable.rs6
-rw-r--r--tests/codegen-units/item-collection/non-generic-drop-glue.rs12
-rw-r--r--tests/codegen-units/item-collection/non-generic-functions.rs4
-rw-r--r--tests/codegen-units/item-collection/overloaded-operators.rs20
-rw-r--r--tests/codegen-units/item-collection/static-init.rs4
-rw-r--r--tests/codegen-units/item-collection/trait-implementations.rs34
-rw-r--r--tests/codegen-units/item-collection/trait-method-as-argument.rs13
-rw-r--r--tests/codegen-units/item-collection/trait-method-default-impl.rs8
-rw-r--r--tests/codegen-units/item-collection/unsizing.rs8
-rw-r--r--tests/codegen-units/item-collection/unused-traits-and-generics.rs8
-rw-r--r--tests/codegen-units/partitioning/auxiliary/shared_generics_aux.rs2
-rw-r--r--tests/codegen-units/partitioning/extern-generic.rs2
-rw-r--r--tests/codegen-units/partitioning/inlining-from-extern-crate.rs11
-rw-r--r--tests/codegen-units/partitioning/local-generic.rs6
-rw-r--r--tests/codegen-units/partitioning/local-inlining-but-not-all.rs11
-rw-r--r--tests/codegen-units/partitioning/local-inlining.rs11
-rw-r--r--tests/codegen-units/partitioning/local-transitive-inlining.rs11
-rw-r--r--tests/codegen-units/partitioning/methods-are-with-self-type.rs5
-rw-r--r--tests/codegen-units/partitioning/regular-modules.rs2
-rw-r--r--tests/codegen-units/partitioning/shared-generics.rs3
-rw-r--r--tests/codegen-units/partitioning/statics.rs2
-rw-r--r--tests/codegen-units/partitioning/vtable-through-const.rs22
-rw-r--r--tests/codegen-units/polymorphization/unused_type_parameters.rs153
32 files changed, 208 insertions, 229 deletions
diff --git a/rustfmt.toml b/rustfmt.toml
index 24d300e91fa..5f40abcbaa5 100644
--- a/rustfmt.toml
+++ b/rustfmt.toml
@@ -15,7 +15,6 @@ ignore = [
     # - some UI tests are broken by different formatting
     # - some require special comments in a particular position (e.g. `EMIT_MIR` comments)
     "/tests/codegen/simd-intrinsic/", # Many types like `u8x64` are better hand-formatted.
-    "/tests/codegen-units/",
     "/tests/coverage/",
     "/tests/coverage-run-rustdoc/",
     "/tests/crashes/",
diff --git a/tests/codegen-units/item-collection/auxiliary/cgu_export_trait_method.rs b/tests/codegen-units/item-collection/auxiliary/cgu_export_trait_method.rs
index 5566bb4e4b2..1992baf8c76 100644
--- a/tests/codegen-units/item-collection/auxiliary/cgu_export_trait_method.rs
+++ b/tests/codegen-units/item-collection/auxiliary/cgu_export_trait_method.rs
@@ -2,25 +2,43 @@
 
 #![crate_type = "lib"]
 
-pub trait Trait : Sized {
+pub trait Trait: Sized {
     fn without_self() -> u32;
-    fn without_self_default() -> u32 { 0 }
+    fn without_self_default() -> u32 {
+        0
+    }
 
-    fn with_default_impl(self) -> Self { self }
-    fn with_default_impl_generic<T>(self, x: T) -> (Self, T) { (self, x) }
+    fn with_default_impl(self) -> Self {
+        self
+    }
+    fn with_default_impl_generic<T>(self, x: T) -> (Self, T) {
+        (self, x)
+    }
 
     fn without_default_impl(x: u32) -> (Self, u32);
     fn without_default_impl_generic<T>(x: T) -> (Self, T);
 }
 
 impl Trait for char {
-    fn without_self() -> u32 { 2 }
-    fn without_default_impl(x: u32) -> (Self, u32) { ('c', x) }
-    fn without_default_impl_generic<T>(x: T) -> (Self, T) { ('c', x) }
+    fn without_self() -> u32 {
+        2
+    }
+    fn without_default_impl(x: u32) -> (Self, u32) {
+        ('c', x)
+    }
+    fn without_default_impl_generic<T>(x: T) -> (Self, T) {
+        ('c', x)
+    }
 }
 
 impl Trait for u32 {
-    fn without_self() -> u32 { 1 }
-    fn without_default_impl(x: u32) -> (Self, u32) { (0, x) }
-    fn without_default_impl_generic<T>(x: T) -> (Self, T) { (0, x) }
+    fn without_self() -> u32 {
+        1
+    }
+    fn without_default_impl(x: u32) -> (Self, u32) {
+        (0, x)
+    }
+    fn without_default_impl_generic<T>(x: T) -> (Self, T) {
+        (0, x)
+    }
 }
diff --git a/tests/codegen-units/item-collection/auxiliary/cgu_extern_closures.rs b/tests/codegen-units/item-collection/auxiliary/cgu_extern_closures.rs
index 05ea0a89ff2..0192a3d4188 100644
--- a/tests/codegen-units/item-collection/auxiliary/cgu_extern_closures.rs
+++ b/tests/codegen-units/item-collection/auxiliary/cgu_extern_closures.rs
@@ -2,22 +2,19 @@
 
 #[inline]
 pub fn inlined_fn(x: i32, y: i32) -> i32 {
-
-    let closure = |a, b| { a + b };
+    let closure = |a, b| a + b;
 
     closure(x, y)
 }
 
 pub fn inlined_fn_generic<T>(x: i32, y: i32, z: T) -> (i32, T) {
-
-    let closure = |a, b| { a + b };
+    let closure = |a, b| a + b;
 
     (closure(x, y), z)
 }
 
 pub fn non_inlined_fn(x: i32, y: i32) -> i32 {
-
-    let closure = |a, b| { a + b };
+    let closure = |a, b| a + b;
 
     closure(x, y)
 }
diff --git a/tests/codegen-units/item-collection/cross-crate-closures.rs b/tests/codegen-units/item-collection/cross-crate-closures.rs
index 4ec7f17d584..2dab19401ed 100644
--- a/tests/codegen-units/item-collection/cross-crate-closures.rs
+++ b/tests/codegen-units/item-collection/cross-crate-closures.rs
@@ -14,7 +14,6 @@ extern crate cgu_extern_closures;
 //~ MONO_ITEM fn cross_crate_closures::start[0]
 #[start]
 fn start(_: isize, _: *const *const u8) -> isize {
-
     //~ MONO_ITEM fn cgu_extern_closures::inlined_fn[0]
     //~ MONO_ITEM fn cgu_extern_closures::inlined_fn[0]::{{closure}}[0]
     let _ = cgu_extern_closures::inlined_fn(1, 2);
diff --git a/tests/codegen-units/item-collection/cross-crate-trait-method.rs b/tests/codegen-units/item-collection/cross-crate-trait-method.rs
index 84977328e49..99777760315 100644
--- a/tests/codegen-units/item-collection/cross-crate-trait-method.rs
+++ b/tests/codegen-units/item-collection/cross-crate-trait-method.rs
@@ -24,8 +24,6 @@ fn start(_: isize, _: *const *const u8) -> isize {
     //~ MONO_ITEM fn <char as cgu_export_trait_method::Trait>::with_default_impl
     let _ = Trait::with_default_impl('c');
 
-
-
     //~ MONO_ITEM fn <u32 as cgu_export_trait_method::Trait>::with_default_impl_generic::<&str>
     let _ = Trait::with_default_impl_generic(0u32, "abc");
     //~ MONO_ITEM fn <u32 as cgu_export_trait_method::Trait>::with_default_impl_generic::<bool>
diff --git a/tests/codegen-units/item-collection/drop_in_place_intrinsic.rs b/tests/codegen-units/item-collection/drop_in_place_intrinsic.rs
index 66dcda26066..947faa165a9 100644
--- a/tests/codegen-units/item-collection/drop_in_place_intrinsic.rs
+++ b/tests/codegen-units/item-collection/drop_in_place_intrinsic.rs
@@ -15,7 +15,6 @@ impl Drop for StructWithDtor {
 //~ MONO_ITEM fn start
 #[start]
 fn start(_: isize, _: *const *const u8) -> isize {
-
     //~ MONO_ITEM fn std::ptr::drop_in_place::<[StructWithDtor; 2]> - shim(Some([StructWithDtor; 2])) @@ drop_in_place_intrinsic-cgu.0[Internal]
     let x = [StructWithDtor(0), StructWithDtor(1)];
 
diff --git a/tests/codegen-units/item-collection/function-as-argument.rs b/tests/codegen-units/item-collection/function-as-argument.rs
index 4e6fd99d29e..4be713dc367 100644
--- a/tests/codegen-units/item-collection/function-as-argument.rs
+++ b/tests/codegen-units/item-collection/function-as-argument.rs
@@ -16,7 +16,6 @@ fn take_fn_pointer<T1, T2>(f: fn(T1, T2), x: T1, y: T2) {
 //~ MONO_ITEM fn start
 #[start]
 fn start(_: isize, _: *const *const u8) -> isize {
-
     //~ MONO_ITEM fn take_fn_once::<u32, &str, fn(u32, &str) {function::<u32, &str>}>
     //~ MONO_ITEM fn function::<u32, &str>
     //~ MONO_ITEM fn <fn(u32, &str) {function::<u32, &str>} as std::ops::FnOnce<(u32, &str)>>::call_once - shim(fn(u32, &str) {function::<u32, &str>})
diff --git a/tests/codegen-units/item-collection/generic-drop-glue.rs b/tests/codegen-units/item-collection/generic-drop-glue.rs
index 99250dc7dc6..d861d269fae 100644
--- a/tests/codegen-units/item-collection/generic-drop-glue.rs
+++ b/tests/codegen-units/item-collection/generic-drop-glue.rs
@@ -21,7 +21,7 @@ struct StructNoDrop<T1, T2> {
 
 enum EnumWithDrop<T1, T2> {
     A(T1),
-    B(T2)
+    B(T2),
 }
 
 impl<T1, T2> Drop for EnumWithDrop<T1, T2> {
@@ -30,10 +30,9 @@ impl<T1, T2> Drop for EnumWithDrop<T1, T2> {
 
 enum EnumNoDrop<T1, T2> {
     A(T1),
-    B(T2)
+    B(T2),
 }
 
-
 struct NonGenericNoDrop(#[allow(dead_code)] i32);
 
 struct NonGenericWithDrop(#[allow(dead_code)] i32);
@@ -67,24 +66,24 @@ fn start(_: isize, _: *const *const u8) -> isize {
     //~ MONO_ITEM fn <EnumWithDrop<i32, i64> as std::ops::Drop>::drop
     let _ = match EnumWithDrop::A::<i32, i64>(0) {
         EnumWithDrop::A(x) => x,
-        EnumWithDrop::B(x) => x as i32
+        EnumWithDrop::B(x) => x as i32,
     };
 
     //~ MONO_ITEM fn std::ptr::drop_in_place::<EnumWithDrop<f64, f32>> - shim(Some(EnumWithDrop<f64, f32>)) @@ generic_drop_glue-cgu.0[Internal]
     //~ MONO_ITEM fn <EnumWithDrop<f64, f32> as std::ops::Drop>::drop
     let _ = match EnumWithDrop::B::<f64, f32>(1.0) {
         EnumWithDrop::A(x) => x,
-        EnumWithDrop::B(x) => x as f64
+        EnumWithDrop::B(x) => x as f64,
     };
 
     let _ = match EnumNoDrop::A::<i32, i64>(0) {
         EnumNoDrop::A(x) => x,
-        EnumNoDrop::B(x) => x as i32
+        EnumNoDrop::B(x) => x as i32,
     };
 
     let _ = match EnumNoDrop::B::<f64, f32>(1.0) {
         EnumNoDrop::A(x) => x,
-        EnumNoDrop::B(x) => x as f64
+        EnumNoDrop::B(x) => x as f64,
     };
 
     0
diff --git a/tests/codegen-units/item-collection/generic-impl.rs b/tests/codegen-units/item-collection/generic-impl.rs
index 6e60907c185..23d09e0d8af 100644
--- a/tests/codegen-units/item-collection/generic-impl.rs
+++ b/tests/codegen-units/item-collection/generic-impl.rs
@@ -8,15 +8,13 @@ struct Struct<T> {
     f: fn(x: T) -> T,
 }
 
-fn id<T>(x: T) -> T { x }
+fn id<T>(x: T) -> T {
+    x
+}
 
 impl<T> Struct<T> {
-
     fn new(x: T) -> Struct<T> {
-        Struct {
-            x: x,
-            f: id
-        }
+        Struct { x: x, f: id }
     }
 
     fn get<T2>(self, x: T2) -> (T, T2) {
@@ -25,11 +23,10 @@ impl<T> Struct<T> {
 }
 
 pub struct LifeTimeOnly<'a> {
-    _a: &'a u32
+    _a: &'a u32,
 }
 
 impl<'a> LifeTimeOnly<'a> {
-
     //~ MONO_ITEM fn LifeTimeOnly::<'_>::foo
     pub fn foo(&self) {}
     //~ MONO_ITEM fn LifeTimeOnly::<'_>::bar
diff --git a/tests/codegen-units/item-collection/instantiation-through-vtable.rs b/tests/codegen-units/item-collection/instantiation-through-vtable.rs
index 08e8c03a732..59dd4311a03 100644
--- a/tests/codegen-units/item-collection/instantiation-through-vtable.rs
+++ b/tests/codegen-units/item-collection/instantiation-through-vtable.rs
@@ -10,11 +10,13 @@ trait Trait {
 }
 
 struct Struct<T> {
-    _a: T
+    _a: T,
 }
 
 impl<T> Trait for Struct<T> {
-    fn foo(&self) -> u32 { 0 }
+    fn foo(&self) -> u32 {
+        0
+    }
     fn bar(&self) {}
 }
 
diff --git a/tests/codegen-units/item-collection/non-generic-drop-glue.rs b/tests/codegen-units/item-collection/non-generic-drop-glue.rs
index d74b17463bf..f7bb2f3f2f4 100644
--- a/tests/codegen-units/item-collection/non-generic-drop-glue.rs
+++ b/tests/codegen-units/item-collection/non-generic-drop-glue.rs
@@ -7,7 +7,7 @@
 
 //~ MONO_ITEM fn std::ptr::drop_in_place::<StructWithDrop> - shim(Some(StructWithDrop)) @@ non_generic_drop_glue-cgu.0[Internal]
 struct StructWithDrop {
-    x: i32
+    x: i32,
 }
 
 impl Drop for StructWithDrop {
@@ -16,12 +16,12 @@ impl Drop for StructWithDrop {
 }
 
 struct StructNoDrop {
-    x: i32
+    x: i32,
 }
 
 //~ MONO_ITEM fn std::ptr::drop_in_place::<EnumWithDrop> - shim(Some(EnumWithDrop)) @@ non_generic_drop_glue-cgu.0[Internal]
 enum EnumWithDrop {
-    A(i32)
+    A(i32),
 }
 
 impl Drop for EnumWithDrop {
@@ -30,7 +30,7 @@ impl Drop for EnumWithDrop {
 }
 
 enum EnumNoDrop {
-    A(i32)
+    A(i32),
 }
 
 //~ MONO_ITEM fn start
@@ -39,10 +39,10 @@ fn start(_: isize, _: *const *const u8) -> isize {
     let _ = StructWithDrop { x: 0 }.x;
     let _ = StructNoDrop { x: 0 }.x;
     let _ = match EnumWithDrop::A(0) {
-        EnumWithDrop::A(x) => x
+        EnumWithDrop::A(x) => x,
     };
     let _ = match EnumNoDrop::A(0) {
-        EnumNoDrop::A(x) => x
+        EnumNoDrop::A(x) => x,
     };
 
     0
diff --git a/tests/codegen-units/item-collection/non-generic-functions.rs b/tests/codegen-units/item-collection/non-generic-functions.rs
index 49a999a0d7c..d4d7d221827 100644
--- a/tests/codegen-units/item-collection/non-generic-functions.rs
+++ b/tests/codegen-units/item-collection/non-generic-functions.rs
@@ -25,7 +25,9 @@ fn bar() {
     baz();
 }
 
-struct Struct { _x: i32 }
+struct Struct {
+    _x: i32,
+}
 
 impl Struct {
     //~ MONO_ITEM fn Struct::foo
diff --git a/tests/codegen-units/item-collection/overloaded-operators.rs b/tests/codegen-units/item-collection/overloaded-operators.rs
index 23141c27de6..69b55695d3d 100644
--- a/tests/codegen-units/item-collection/overloaded-operators.rs
+++ b/tests/codegen-units/item-collection/overloaded-operators.rs
@@ -1,12 +1,12 @@
 //@ compile-flags:-Zprint-mono-items=eager
 
 #![deny(dead_code)]
-#![crate_type="lib"]
+#![crate_type = "lib"]
 
-use std::ops::{Index, IndexMut, Add, Deref};
+use std::ops::{Add, Deref, Index, IndexMut};
 
 pub struct Indexable {
-    data: [u8; 3]
+    data: [u8; 3],
 }
 
 impl Index<usize> for Indexable {
@@ -14,32 +14,22 @@ impl Index<usize> for Indexable {
 
     //~ MONO_ITEM fn <Indexable as std::ops::Index<usize>>::index
     fn index(&self, index: usize) -> &Self::Output {
-        if index >= 3 {
-            &self.data[0]
-        } else {
-            &self.data[index]
-        }
+        if index >= 3 { &self.data[0] } else { &self.data[index] }
     }
 }
 
 impl IndexMut<usize> for Indexable {
     //~ MONO_ITEM fn <Indexable as std::ops::IndexMut<usize>>::index_mut
     fn index_mut(&mut self, index: usize) -> &mut Self::Output {
-        if index >= 3 {
-            &mut self.data[0]
-        } else {
-            &mut self.data[index]
-        }
+        if index >= 3 { &mut self.data[0] } else { &mut self.data[index] }
     }
 }
 
-
 //~ MONO_ITEM fn <Equatable as std::cmp::PartialEq>::eq
 //~ MONO_ITEM fn <Equatable as std::cmp::PartialEq>::ne
 #[derive(PartialEq)]
 pub struct Equatable(u32);
 
-
 impl Add<u32> for Equatable {
     type Output = u32;
 
diff --git a/tests/codegen-units/item-collection/static-init.rs b/tests/codegen-units/item-collection/static-init.rs
index b357f5cd66b..1406fba2b98 100644
--- a/tests/codegen-units/item-collection/static-init.rs
+++ b/tests/codegen-units/item-collection/static-init.rs
@@ -2,9 +2,9 @@
 
 #![feature(start)]
 
-pub static FN : fn() = foo::<i32>;
+pub static FN: fn() = foo::<i32>;
 
-pub fn foo<T>() { }
+pub fn foo<T>() {}
 
 //~ MONO_ITEM fn foo::<T>
 //~ MONO_ITEM static FN
diff --git a/tests/codegen-units/item-collection/trait-implementations.rs b/tests/codegen-units/item-collection/trait-implementations.rs
index b364cc5b333..e4c444499e0 100644
--- a/tests/codegen-units/item-collection/trait-implementations.rs
+++ b/tests/codegen-units/item-collection/trait-implementations.rs
@@ -9,7 +9,6 @@ pub trait SomeTrait {
 }
 
 impl SomeTrait for i64 {
-
     //~ MONO_ITEM fn <i64 as SomeTrait>::foo
     fn foo(&self) {}
 
@@ -17,7 +16,6 @@ impl SomeTrait for i64 {
 }
 
 impl SomeTrait for i32 {
-
     //~ MONO_ITEM fn <i32 as SomeTrait>::foo
     fn foo(&self) {}
 
@@ -31,7 +29,6 @@ pub trait SomeGenericTrait<T> {
 
 // Concrete impl of generic trait
 impl SomeGenericTrait<u32> for f64 {
-
     //~ MONO_ITEM fn <f64 as SomeGenericTrait<u32>>::foo
     fn foo(&self, _: u32) {}
 
@@ -40,7 +37,6 @@ impl SomeGenericTrait<u32> for f64 {
 
 // Generic impl of generic trait
 impl<T> SomeGenericTrait<T> for f32 {
-
     fn foo(&self, _: T) {}
     fn bar<T2>(&self, _: T, _: T2) {}
 }
@@ -48,26 +44,26 @@ impl<T> SomeGenericTrait<T> for f32 {
 //~ MONO_ITEM fn start
 #[start]
 fn start(_: isize, _: *const *const u8) -> isize {
-   //~ MONO_ITEM fn <i32 as SomeTrait>::bar::<char>
-   0i32.bar('x');
+    //~ MONO_ITEM fn <i32 as SomeTrait>::bar::<char>
+    0i32.bar('x');
 
-   //~ MONO_ITEM fn <f64 as SomeGenericTrait<u32>>::bar::<&str>
-   0f64.bar(0u32, "&str");
+    //~ MONO_ITEM fn <f64 as SomeGenericTrait<u32>>::bar::<&str>
+    0f64.bar(0u32, "&str");
 
-   //~ MONO_ITEM fn <f64 as SomeGenericTrait<u32>>::bar::<()>
-   0f64.bar(0u32, ());
+    //~ MONO_ITEM fn <f64 as SomeGenericTrait<u32>>::bar::<()>
+    0f64.bar(0u32, ());
 
-   //~ MONO_ITEM fn <f32 as SomeGenericTrait<char>>::foo
-   0f32.foo('x');
+    //~ MONO_ITEM fn <f32 as SomeGenericTrait<char>>::foo
+    0f32.foo('x');
 
-   //~ MONO_ITEM fn <f32 as SomeGenericTrait<i64>>::foo
-   0f32.foo(-1i64);
+    //~ MONO_ITEM fn <f32 as SomeGenericTrait<i64>>::foo
+    0f32.foo(-1i64);
 
-   //~ MONO_ITEM fn <f32 as SomeGenericTrait<u32>>::bar::<()>
-   0f32.bar(0u32, ());
+    //~ MONO_ITEM fn <f32 as SomeGenericTrait<u32>>::bar::<()>
+    0f32.bar(0u32, ());
 
-   //~ MONO_ITEM fn <f32 as SomeGenericTrait<&str>>::bar::<&str>
-   0f32.bar("&str", "&str");
+    //~ MONO_ITEM fn <f32 as SomeGenericTrait<&str>>::bar::<&str>
+    0f32.bar("&str", "&str");
 
-   0
+    0
 }
diff --git a/tests/codegen-units/item-collection/trait-method-as-argument.rs b/tests/codegen-units/item-collection/trait-method-as-argument.rs
index c25e3ea45ec..10cf2a0e967 100644
--- a/tests/codegen-units/item-collection/trait-method-as-argument.rs
+++ b/tests/codegen-units/item-collection/trait-method-as-argument.rs
@@ -3,16 +3,19 @@
 #![deny(dead_code)]
 #![feature(start)]
 
-trait Trait : Sized {
-    fn foo(self) -> Self { self }
+trait Trait: Sized {
+    fn foo(self) -> Self {
+        self
+    }
 }
 
 impl Trait for u32 {
-    fn foo(self) -> u32 { self }
+    fn foo(self) -> u32 {
+        self
+    }
 }
 
-impl Trait for char {
-}
+impl Trait for char {}
 
 fn take_foo_once<T, F: FnOnce(T) -> T>(f: F, arg: T) -> T {
     (f)(arg)
diff --git a/tests/codegen-units/item-collection/trait-method-default-impl.rs b/tests/codegen-units/item-collection/trait-method-default-impl.rs
index 89fec350f09..b0a43d28e40 100644
--- a/tests/codegen-units/item-collection/trait-method-default-impl.rs
+++ b/tests/codegen-units/item-collection/trait-method-default-impl.rs
@@ -4,8 +4,10 @@
 #![feature(start)]
 
 trait SomeTrait {
-    fn foo(&self) { }
-    fn bar<T>(&self, x: T) -> T { x }
+    fn foo(&self) {}
+    fn bar<T>(&self, x: T) -> T {
+        x
+    }
 }
 
 impl SomeTrait for i8 {
@@ -17,7 +19,7 @@ impl SomeTrait for i8 {
 }
 
 trait SomeGenericTrait<T1> {
-    fn foo(&self) { }
+    fn foo(&self) {}
     fn bar<T2>(&self, x: T1, y: T2) {}
 }
 
diff --git a/tests/codegen-units/item-collection/unsizing.rs b/tests/codegen-units/item-collection/unsizing.rs
index 1e2d7f17484..5ea8b47962a 100644
--- a/tests/codegen-units/item-collection/unsizing.rs
+++ b/tests/codegen-units/item-collection/unsizing.rs
@@ -27,7 +27,7 @@ impl Trait for char {
 struct Struct<T: ?Sized> {
     _a: u32,
     _b: i32,
-    _c: T
+    _c: T,
 }
 
 impl Trait for f64 {
@@ -60,11 +60,7 @@ fn start(_: isize, _: *const *const u8) -> isize {
     let _char_unsized = char_sized as &Trait;
 
     // struct field
-    let struct_sized = &Struct {
-        _a: 1,
-        _b: 2,
-        _c: 3.0f64
-    };
+    let struct_sized = &Struct { _a: 1, _b: 2, _c: 3.0f64 };
     //~ MONO_ITEM fn std::ptr::drop_in_place::<f64> - shim(None) @@ unsizing-cgu.0[Internal]
     //~ MONO_ITEM fn <f64 as Trait>::foo
     let _struct_unsized = struct_sized as &Struct<Trait>;
diff --git a/tests/codegen-units/item-collection/unused-traits-and-generics.rs b/tests/codegen-units/item-collection/unused-traits-and-generics.rs
index 27cdae2c096..d5088d3f893 100644
--- a/tests/codegen-units/item-collection/unused-traits-and-generics.rs
+++ b/tests/codegen-units/item-collection/unused-traits-and-generics.rs
@@ -1,6 +1,6 @@
 //@ compile-flags:-Zprint-mono-items=eager
 
-#![crate_type="lib"]
+#![crate_type = "lib"]
 #![deny(dead_code)]
 
 // This test asserts that no codegen items are generated for generic items that
@@ -16,7 +16,7 @@ pub fn foo<T: Copy>(x: T) -> (T, T) {
 }
 
 pub struct Struct<T> {
-    x: T
+    x: T,
 }
 
 impl<T> Struct<T> {
@@ -29,7 +29,7 @@ impl<T> Struct<T> {
 
 pub enum Enum<T> {
     A(T),
-    B { x: T }
+    B { x: T },
 }
 
 impl<T> Enum<T> {
@@ -56,7 +56,7 @@ impl<T> TupleStruct<T> {
 pub type Pair<T> = (T, T);
 
 pub struct NonGeneric {
-    x: i32
+    x: i32,
 }
 
 impl NonGeneric {
diff --git a/tests/codegen-units/partitioning/auxiliary/shared_generics_aux.rs b/tests/codegen-units/partitioning/auxiliary/shared_generics_aux.rs
index 158932d165d..b6c568ed387 100644
--- a/tests/codegen-units/partitioning/auxiliary/shared_generics_aux.rs
+++ b/tests/codegen-units/partitioning/auxiliary/shared_generics_aux.rs
@@ -3,7 +3,7 @@
 //@ compile-flags:-Zshare-generics=yes -Copt-level=0
 //@ no-prefer-dynamic
 
-#![crate_type="rlib"]
+#![crate_type = "rlib"]
 
 pub fn generic_fn<T>(x: T, y: T) -> (T, T) {
     (x, y)
diff --git a/tests/codegen-units/partitioning/extern-generic.rs b/tests/codegen-units/partitioning/extern-generic.rs
index 0e4b6a37f71..602a5240283 100644
--- a/tests/codegen-units/partitioning/extern-generic.rs
+++ b/tests/codegen-units/partitioning/extern-generic.rs
@@ -3,7 +3,7 @@
 //@ compile-flags:-Zprint-mono-items=eager -Zshare-generics=y
 
 #![allow(dead_code)]
-#![crate_type="lib"]
+#![crate_type = "lib"]
 
 //@ aux-build:cgu_generic_function.rs
 extern crate cgu_generic_function;
diff --git a/tests/codegen-units/partitioning/inlining-from-extern-crate.rs b/tests/codegen-units/partitioning/inlining-from-extern-crate.rs
index d021f467f1f..b007ffe1cb5 100644
--- a/tests/codegen-units/partitioning/inlining-from-extern-crate.rs
+++ b/tests/codegen-units/partitioning/inlining-from-extern-crate.rs
@@ -3,7 +3,7 @@
 //@ compile-flags:-Zprint-mono-items=lazy
 //@ compile-flags:-Zinline-in-all-cgus
 
-#![crate_type="lib"]
+#![crate_type = "lib"]
 
 //@ aux-build:cgu_explicit_inlining.rs
 extern crate cgu_explicit_inlining;
@@ -15,8 +15,7 @@ extern crate cgu_explicit_inlining;
 //~ MONO_ITEM fn cgu_explicit_inlining::always_inlined @@ inlining_from_extern_crate[Internal] inlining_from_extern_crate-mod2[Internal]
 
 //~ MONO_ITEM fn user @@ inlining_from_extern_crate[External]
-pub fn user()
-{
+pub fn user() {
     cgu_explicit_inlining::inlined();
     cgu_explicit_inlining::always_inlined();
 
@@ -28,8 +27,7 @@ pub mod mod1 {
     use cgu_explicit_inlining;
 
     //~ MONO_ITEM fn mod1::user @@ inlining_from_extern_crate-mod1[External]
-    pub fn user()
-    {
+    pub fn user() {
         cgu_explicit_inlining::inlined();
 
         // does not generate a monomorphization in this crate
@@ -41,8 +39,7 @@ pub mod mod2 {
     use cgu_explicit_inlining;
 
     //~ MONO_ITEM fn mod2::user @@ inlining_from_extern_crate-mod2[External]
-    pub fn user()
-    {
+    pub fn user() {
         cgu_explicit_inlining::always_inlined();
 
         // does not generate a monomorphization in this crate
diff --git a/tests/codegen-units/partitioning/local-generic.rs b/tests/codegen-units/partitioning/local-generic.rs
index 06f46b23db6..0cfc572650c 100644
--- a/tests/codegen-units/partitioning/local-generic.rs
+++ b/tests/codegen-units/partitioning/local-generic.rs
@@ -3,13 +3,15 @@
 //@ compile-flags:-Zprint-mono-items=eager
 
 #![allow(dead_code)]
-#![crate_type="lib"]
+#![crate_type = "lib"]
 
 //~ MONO_ITEM fn generic::<u32> @@ local_generic.volatile[External]
 //~ MONO_ITEM fn generic::<u64> @@ local_generic.volatile[External]
 //~ MONO_ITEM fn generic::<char> @@ local_generic.volatile[External]
 //~ MONO_ITEM fn generic::<&str> @@ local_generic.volatile[External]
-pub fn generic<T>(x: T) -> T { x }
+pub fn generic<T>(x: T) -> T {
+    x
+}
 
 //~ MONO_ITEM fn user @@ local_generic[Internal]
 fn user() {
diff --git a/tests/codegen-units/partitioning/local-inlining-but-not-all.rs b/tests/codegen-units/partitioning/local-inlining-but-not-all.rs
index 2f9cbe83f1d..454de255254 100644
--- a/tests/codegen-units/partitioning/local-inlining-but-not-all.rs
+++ b/tests/codegen-units/partitioning/local-inlining-but-not-all.rs
@@ -4,16 +4,13 @@
 //@ compile-flags:-Zinline-in-all-cgus=no
 
 #![allow(dead_code)]
-#![crate_type="lib"]
+#![crate_type = "lib"]
 
 mod inline {
 
     //~ MONO_ITEM fn inline::inlined_function @@ local_inlining_but_not_all-inline[External]
     #[inline]
-    pub fn inlined_function()
-    {
-
-    }
+    pub fn inlined_function() {}
 }
 
 pub mod user1 {
@@ -37,7 +34,5 @@ pub mod user2 {
 pub mod non_user {
 
     //~ MONO_ITEM fn non_user::baz @@ local_inlining_but_not_all-non_user[External]
-    pub fn baz() {
-
-    }
+    pub fn baz() {}
 }
diff --git a/tests/codegen-units/partitioning/local-inlining.rs b/tests/codegen-units/partitioning/local-inlining.rs
index 2329a876c96..42c68b5c621 100644
--- a/tests/codegen-units/partitioning/local-inlining.rs
+++ b/tests/codegen-units/partitioning/local-inlining.rs
@@ -4,17 +4,14 @@
 //@ compile-flags:-Zinline-in-all-cgus
 
 #![allow(dead_code)]
-#![crate_type="lib"]
+#![crate_type = "lib"]
 
 mod inline {
 
     // Important: This function should show up in all codegen units where it is inlined
     //~ MONO_ITEM fn inline::inlined_function @@ local_inlining-user1[Internal] local_inlining-user2[Internal]
     #[inline(always)]
-    pub fn inlined_function()
-    {
-
-    }
+    pub fn inlined_function() {}
 }
 
 pub mod user1 {
@@ -38,7 +35,5 @@ pub mod user2 {
 pub mod non_user {
 
     //~ MONO_ITEM fn non_user::baz @@ local_inlining-non_user[External]
-    pub fn baz() {
-
-    }
+    pub fn baz() {}
 }
diff --git a/tests/codegen-units/partitioning/local-transitive-inlining.rs b/tests/codegen-units/partitioning/local-transitive-inlining.rs
index 4ccc53aea1d..0d279ebe740 100644
--- a/tests/codegen-units/partitioning/local-transitive-inlining.rs
+++ b/tests/codegen-units/partitioning/local-transitive-inlining.rs
@@ -4,16 +4,13 @@
 //@ compile-flags:-Zinline-in-all-cgus
 
 #![allow(dead_code)]
-#![crate_type="rlib"]
+#![crate_type = "rlib"]
 
 mod inline {
 
     //~ MONO_ITEM fn inline::inlined_function @@ local_transitive_inlining-indirect_user[Internal]
     #[inline(always)]
-    pub fn inlined_function()
-    {
-
-    }
+    pub fn inlined_function() {}
 }
 
 mod direct_user {
@@ -38,7 +35,5 @@ pub mod indirect_user {
 pub mod non_user {
 
     //~ MONO_ITEM fn non_user::baz @@ local_transitive_inlining-non_user[External]
-    pub fn baz() {
-
-    }
+    pub fn baz() {}
 }
diff --git a/tests/codegen-units/partitioning/methods-are-with-self-type.rs b/tests/codegen-units/partitioning/methods-are-with-self-type.rs
index 3ba53334cc9..901e7507d73 100644
--- a/tests/codegen-units/partitioning/methods-are-with-self-type.rs
+++ b/tests/codegen-units/partitioning/methods-are-with-self-type.rs
@@ -15,7 +15,7 @@ struct SomeType;
 struct SomeGenericType<T1, T2>(T1, T2);
 
 mod mod1 {
-    use super::{SomeType, SomeGenericType};
+    use super::{SomeGenericType, SomeType};
 
     // Even though the impl is in `mod1`, the methods should end up in the
     // parent module, since that is where their self-type is.
@@ -40,8 +40,7 @@ trait Trait {
 
 // We provide an implementation of `Trait` for all types. The corresponding
 // monomorphizations should end up in whichever module the concrete `T` is.
-impl<T> Trait for T
-{
+impl<T> Trait for T {
     fn foo(&self) {}
 }
 
diff --git a/tests/codegen-units/partitioning/regular-modules.rs b/tests/codegen-units/partitioning/regular-modules.rs
index 68601975d06..29497146415 100644
--- a/tests/codegen-units/partitioning/regular-modules.rs
+++ b/tests/codegen-units/partitioning/regular-modules.rs
@@ -3,7 +3,7 @@
 //@ compile-flags:-Zprint-mono-items=eager
 
 #![allow(dead_code)]
-#![crate_type="lib"]
+#![crate_type = "lib"]
 
 //~ MONO_ITEM fn foo @@ regular_modules[Internal]
 fn foo() {}
diff --git a/tests/codegen-units/partitioning/shared-generics.rs b/tests/codegen-units/partitioning/shared-generics.rs
index 5b78794316c..ea312719ac9 100644
--- a/tests/codegen-units/partitioning/shared-generics.rs
+++ b/tests/codegen-units/partitioning/shared-generics.rs
@@ -4,14 +4,13 @@
 //@ incremental
 //@ compile-flags:-Zprint-mono-items=eager -Zshare-generics=yes -Copt-level=0
 
-#![crate_type="rlib"]
+#![crate_type = "rlib"]
 
 //@ aux-build:shared_generics_aux.rs
 extern crate shared_generics_aux;
 
 //~ MONO_ITEM fn foo
 pub fn foo() {
-
     //~ MONO_ITEM fn shared_generics_aux::generic_fn::<u16> @@ shared_generics_aux-in-shared_generics.volatile[External]
     let _ = shared_generics_aux::generic_fn(0u16, 1u16);
 
diff --git a/tests/codegen-units/partitioning/statics.rs b/tests/codegen-units/partitioning/statics.rs
index c7eef1f3789..00dd6d877e1 100644
--- a/tests/codegen-units/partitioning/statics.rs
+++ b/tests/codegen-units/partitioning/statics.rs
@@ -2,7 +2,7 @@
 //@ incremental
 //@ compile-flags:-Zprint-mono-items=lazy
 
-#![crate_type="rlib"]
+#![crate_type = "rlib"]
 
 //~ MONO_ITEM static FOO @@ statics[Internal]
 static FOO: u32 = 0;
diff --git a/tests/codegen-units/partitioning/vtable-through-const.rs b/tests/codegen-units/partitioning/vtable-through-const.rs
index f91c0c0bfdb..a9186cea9c8 100644
--- a/tests/codegen-units/partitioning/vtable-through-const.rs
+++ b/tests/codegen-units/partitioning/vtable-through-const.rs
@@ -28,20 +28,24 @@ mod mod1 {
     }
 
     impl<T> Trait1Gen<T> for NeedsDrop {
-        fn do_something(&self, x: T) -> T { x }
-        fn do_something_else(&self, x: T) -> T { x }
+        fn do_something(&self, x: T) -> T {
+            x
+        }
+        fn do_something_else(&self, x: T) -> T {
+            x
+        }
     }
 
     //~ MONO_ITEM fn mod1::id::<i64> @@ vtable_through_const-mod1.volatile[Internal]
-    fn id<T>(x: T) -> T { x }
+    fn id<T>(x: T) -> T {
+        x
+    }
 
     // These are referenced, so they produce mono-items (see start())
     pub const TRAIT1_REF: &'static Trait1 = &NeedsDrop as &Trait1;
     pub const TRAIT1_GEN_REF: &'static Trait1Gen<u8> = &NeedsDrop as &Trait1Gen<u8>;
     pub const ID_CHAR: fn(char) -> char = id::<char>;
 
-
-
     pub trait Trait2 {
         fn do_something(&self) {}
         fn do_something_else(&self) {}
@@ -57,8 +61,12 @@ mod mod1 {
     }
 
     impl<T> Trait2Gen<T> for NeedsDrop {
-        fn do_something(&self, x: T) -> T { x }
-        fn do_something_else(&self, x: T) -> T { x }
+        fn do_something(&self, x: T) -> T {
+            x
+        }
+        fn do_something_else(&self, x: T) -> T {
+            x
+        }
     }
 
     // These are not referenced, so they do not produce mono-items
diff --git a/tests/codegen-units/polymorphization/unused_type_parameters.rs b/tests/codegen-units/polymorphization/unused_type_parameters.rs
index cf5f7c32098..438305f112f 100644
--- a/tests/codegen-units/polymorphization/unused_type_parameters.rs
+++ b/tests/codegen-units/polymorphization/unused_type_parameters.rs
@@ -9,54 +9,51 @@ mod functions {
     // Function doesn't have any type parameters to be unused.
     pub fn no_parameters() {}
 
-//~ MONO_ITEM fn functions::no_parameters
+    //~ MONO_ITEM fn functions::no_parameters
 
     // Function has an unused type parameter.
-    pub fn unused<T>() {
-    }
+    pub fn unused<T>() {}
 
-//~ MONO_ITEM fn functions::unused::<T>
+    //~ MONO_ITEM fn functions::unused::<T>
 
     // Function uses type parameter in value of a binding.
     pub fn used_binding_value<T: Default>() {
         let _: T = Default::default();
     }
 
-//~ MONO_ITEM fn functions::used_binding_value::<u32>
-//~ MONO_ITEM fn functions::used_binding_value::<u64>
+    //~ MONO_ITEM fn functions::used_binding_value::<u32>
+    //~ MONO_ITEM fn functions::used_binding_value::<u64>
 
     // Function uses type parameter in type of a binding.
     pub fn used_binding_type<T>() {
         let _: Option<T> = None;
     }
 
-//~ MONO_ITEM fn functions::used_binding_type::<u32>
-//~ MONO_ITEM fn functions::used_binding_type::<u64>
+    //~ MONO_ITEM fn functions::used_binding_type::<u32>
+    //~ MONO_ITEM fn functions::used_binding_type::<u64>
 
     // Function uses type parameter in argument.
-    pub fn used_argument<T>(_: T) {
-    }
+    pub fn used_argument<T>(_: T) {}
 
-//~ MONO_ITEM fn functions::used_argument::<u32>
-//~ MONO_ITEM fn functions::used_argument::<u64>
-//
+    //~ MONO_ITEM fn functions::used_argument::<u32>
+    //~ MONO_ITEM fn functions::used_argument::<u64>
+    //
     // Function uses type parameter in substitutions to another function.
     pub fn used_substs<T>() {
         unused::<T>()
     }
 
-//~ MONO_ITEM fn functions::used_substs::<u32>
-//~ MONO_ITEM fn functions::used_substs::<u64>
+    //~ MONO_ITEM fn functions::used_substs::<u32>
+    //~ MONO_ITEM fn functions::used_substs::<u64>
 }
 
-
 mod closures {
     // Function doesn't have any type parameters to be unused.
     pub fn no_parameters() {
         let _ = || {};
     }
 
-//~ MONO_ITEM fn closures::no_parameters
+    //~ MONO_ITEM fn closures::no_parameters
 
     // Function has an unused type parameter in parent and closure.
     pub fn unused<T>() -> u32 {
@@ -64,8 +61,8 @@ mod closures {
         add_one(3)
     }
 
-//~ MONO_ITEM fn closures::unused::<T>::{closure#0}
-//~ MONO_ITEM fn closures::unused::<T>
+    //~ MONO_ITEM fn closures::unused::<T>::{closure#0}
+    //~ MONO_ITEM fn closures::unused::<T>
 
     // Function has an unused type parameter in closure, but not in parent.
     pub fn used_parent<T: Default>() -> u32 {
@@ -74,9 +71,9 @@ mod closures {
         add_one(3)
     }
 
-//~ MONO_ITEM fn closures::used_parent::<T>::{closure#0}
-//~ MONO_ITEM fn closures::used_parent::<u32>
-//~ MONO_ITEM fn closures::used_parent::<u64>
+    //~ MONO_ITEM fn closures::used_parent::<T>::{closure#0}
+    //~ MONO_ITEM fn closures::used_parent::<u32>
+    //~ MONO_ITEM fn closures::used_parent::<u64>
 
     // Function uses type parameter in value of a binding in closure.
     pub fn used_binding_value<T: Default>() -> T {
@@ -88,10 +85,10 @@ mod closures {
         x()
     }
 
-//~ MONO_ITEM fn closures::used_binding_value::<u32>::{closure#0}
-//~ MONO_ITEM fn closures::used_binding_value::<u64>::{closure#0}
-//~ MONO_ITEM fn closures::used_binding_value::<u32>
-//~ MONO_ITEM fn closures::used_binding_value::<u64>
+    //~ MONO_ITEM fn closures::used_binding_value::<u32>::{closure#0}
+    //~ MONO_ITEM fn closures::used_binding_value::<u64>::{closure#0}
+    //~ MONO_ITEM fn closures::used_binding_value::<u32>
+    //~ MONO_ITEM fn closures::used_binding_value::<u64>
 
     // Function uses type parameter in type of a binding in closure.
     pub fn used_binding_type<T>() -> Option<T> {
@@ -103,10 +100,10 @@ mod closures {
         x()
     }
 
-//~ MONO_ITEM fn closures::used_binding_type::<u32>::{closure#0}
-//~ MONO_ITEM fn closures::used_binding_type::<u64>::{closure#0}
-//~ MONO_ITEM fn closures::used_binding_type::<u32>
-//~ MONO_ITEM fn closures::used_binding_type::<u64>
+    //~ MONO_ITEM fn closures::used_binding_type::<u32>::{closure#0}
+    //~ MONO_ITEM fn closures::used_binding_type::<u64>::{closure#0}
+    //~ MONO_ITEM fn closures::used_binding_type::<u32>
+    //~ MONO_ITEM fn closures::used_binding_type::<u64>
 
     // Function and closure uses type parameter in argument.
     pub fn used_argument<T>(t: T) -> u32 {
@@ -114,10 +111,10 @@ mod closures {
         x(t)
     }
 
-//~ MONO_ITEM fn closures::used_argument::<u32>::{closure#0}
-//~ MONO_ITEM fn closures::used_argument::<u64>::{closure#0}
-//~ MONO_ITEM fn closures::used_argument::<u32>
-//~ MONO_ITEM fn closures::used_argument::<u64>
+    //~ MONO_ITEM fn closures::used_argument::<u32>::{closure#0}
+    //~ MONO_ITEM fn closures::used_argument::<u64>::{closure#0}
+    //~ MONO_ITEM fn closures::used_argument::<u32>
+    //~ MONO_ITEM fn closures::used_argument::<u64>
 
     // Closure uses type parameter in argument.
     pub fn used_argument_closure<T: Default>() -> u32 {
@@ -126,10 +123,10 @@ mod closures {
         x(t)
     }
 
-//~ MONO_ITEM fn closures::used_argument_closure::<u32>::{closure#0}
-//~ MONO_ITEM fn closures::used_argument_closure::<u64>::{closure#0}
-//~ MONO_ITEM fn closures::used_argument_closure::<u32>
-//~ MONO_ITEM fn closures::used_argument_closure::<u64>
+    //~ MONO_ITEM fn closures::used_argument_closure::<u32>::{closure#0}
+    //~ MONO_ITEM fn closures::used_argument_closure::<u64>::{closure#0}
+    //~ MONO_ITEM fn closures::used_argument_closure::<u32>
+    //~ MONO_ITEM fn closures::used_argument_closure::<u64>
 
     // Closure uses type parameter as upvar.
     pub fn used_upvar<T: Default>() -> T {
@@ -138,10 +135,10 @@ mod closures {
         y()
     }
 
-//~ MONO_ITEM fn closures::used_upvar::<u32>::{closure#0}
-//~ MONO_ITEM fn closures::used_upvar::<u64>::{closure#0}
-//~ MONO_ITEM fn closures::used_upvar::<u32>
-//~ MONO_ITEM fn closures::used_upvar::<u64>
+    //~ MONO_ITEM fn closures::used_upvar::<u32>::{closure#0}
+    //~ MONO_ITEM fn closures::used_upvar::<u64>::{closure#0}
+    //~ MONO_ITEM fn closures::used_upvar::<u32>
+    //~ MONO_ITEM fn closures::used_upvar::<u64>
 
     // Closure uses type parameter in substitutions to another function.
     pub fn used_substs<T>() {
@@ -149,10 +146,10 @@ mod closures {
         x()
     }
 
-//~ MONO_ITEM fn closures::used_substs::<u32>::{closure#0}
-//~ MONO_ITEM fn closures::used_substs::<u64>::{closure#0}
-//~ MONO_ITEM fn closures::used_substs::<u32>
-//~ MONO_ITEM fn closures::used_substs::<u64>
+    //~ MONO_ITEM fn closures::used_substs::<u32>::{closure#0}
+    //~ MONO_ITEM fn closures::used_substs::<u64>::{closure#0}
+    //~ MONO_ITEM fn closures::used_substs::<u32>
+    //~ MONO_ITEM fn closures::used_substs::<u64>
 }
 
 mod methods {
@@ -160,32 +157,30 @@ mod methods {
 
     impl<F: Default> Foo<F> {
         // Function has an unused type parameter from impl.
-        pub fn unused_impl() {
-        }
+        pub fn unused_impl() {}
 
-//~ MONO_ITEM fn methods::Foo::<F>::unused_impl
+        //~ MONO_ITEM fn methods::Foo::<F>::unused_impl
 
         // Function has an unused type parameter from impl and fn.
-        pub fn unused_both<G: Default>() {
-        }
+        pub fn unused_both<G: Default>() {}
 
-//~ MONO_ITEM fn methods::Foo::<F>::unused_both::<G>
+        //~ MONO_ITEM fn methods::Foo::<F>::unused_both::<G>
 
         // Function uses type parameter from impl.
         pub fn used_impl() {
             let _: F = Default::default();
         }
 
-//~ MONO_ITEM fn methods::Foo::<u32>::used_impl
-//~ MONO_ITEM fn methods::Foo::<u64>::used_impl
+        //~ MONO_ITEM fn methods::Foo::<u32>::used_impl
+        //~ MONO_ITEM fn methods::Foo::<u64>::used_impl
 
         // Function uses type parameter from impl.
         pub fn used_fn<G: Default>() {
             let _: G = Default::default();
         }
 
-//~ MONO_ITEM fn methods::Foo::<F>::used_fn::<u32>
-//~ MONO_ITEM fn methods::Foo::<F>::used_fn::<u64>
+        //~ MONO_ITEM fn methods::Foo::<F>::used_fn::<u32>
+        //~ MONO_ITEM fn methods::Foo::<F>::used_fn::<u64>
 
         // Function uses type parameter from impl.
         pub fn used_both<G: Default>() {
@@ -193,16 +188,16 @@ mod methods {
             let _: G = Default::default();
         }
 
-//~ MONO_ITEM fn methods::Foo::<u32>::used_both::<u32>
-//~ MONO_ITEM fn methods::Foo::<u64>::used_both::<u64>
+        //~ MONO_ITEM fn methods::Foo::<u32>::used_both::<u32>
+        //~ MONO_ITEM fn methods::Foo::<u64>::used_both::<u64>
 
         // Function uses type parameter in substitutions to another function.
         pub fn used_substs() {
             super::functions::unused::<F>()
         }
 
-//~ MONO_ITEM fn methods::Foo::<u32>::used_substs
-//~ MONO_ITEM fn methods::Foo::<u64>::used_substs
+        //~ MONO_ITEM fn methods::Foo::<u32>::used_substs
+        //~ MONO_ITEM fn methods::Foo::<u64>::used_substs
 
         // Function has an unused type parameter from impl and fn.
         pub fn closure_unused_all<G: Default>() -> u32 {
@@ -210,8 +205,8 @@ mod methods {
             add_one(3)
         }
 
-//~ MONO_ITEM fn methods::Foo::<F>::closure_unused_all::<G>::{closure#0}
-//~ MONO_ITEM fn methods::Foo::<F>::closure_unused_all::<G>
+        //~ MONO_ITEM fn methods::Foo::<F>::closure_unused_all::<G>::{closure#0}
+        //~ MONO_ITEM fn methods::Foo::<F>::closure_unused_all::<G>
 
         // Function uses type parameter from impl and fn in closure.
         pub fn closure_used_both<G: Default>() -> u32 {
@@ -224,10 +219,10 @@ mod methods {
             add_one(3)
         }
 
-//~ MONO_ITEM fn methods::Foo::<u32>::closure_used_both::<u32>::{closure#0}
-//~ MONO_ITEM fn methods::Foo::<u64>::closure_used_both::<u64>::{closure#0}
-//~ MONO_ITEM fn methods::Foo::<u32>::closure_used_both::<u32>
-//~ MONO_ITEM fn methods::Foo::<u64>::closure_used_both::<u64>
+        //~ MONO_ITEM fn methods::Foo::<u32>::closure_used_both::<u32>::{closure#0}
+        //~ MONO_ITEM fn methods::Foo::<u64>::closure_used_both::<u64>::{closure#0}
+        //~ MONO_ITEM fn methods::Foo::<u32>::closure_used_both::<u32>
+        //~ MONO_ITEM fn methods::Foo::<u64>::closure_used_both::<u64>
 
         // Function uses type parameter from fn in closure.
         pub fn closure_used_fn<G: Default>() -> u32 {
@@ -239,10 +234,10 @@ mod methods {
             add_one(3)
         }
 
-//~ MONO_ITEM fn methods::Foo::<F>::closure_used_fn::<u32>::{closure#0}
-//~ MONO_ITEM fn methods::Foo::<F>::closure_used_fn::<u64>::{closure#0}
-//~ MONO_ITEM fn methods::Foo::<F>::closure_used_fn::<u32>
-//~ MONO_ITEM fn methods::Foo::<F>::closure_used_fn::<u64>
+        //~ MONO_ITEM fn methods::Foo::<F>::closure_used_fn::<u32>::{closure#0}
+        //~ MONO_ITEM fn methods::Foo::<F>::closure_used_fn::<u64>::{closure#0}
+        //~ MONO_ITEM fn methods::Foo::<F>::closure_used_fn::<u32>
+        //~ MONO_ITEM fn methods::Foo::<F>::closure_used_fn::<u64>
 
         // Function uses type parameter from impl in closure.
         pub fn closure_used_impl<G: Default>() -> u32 {
@@ -254,10 +249,10 @@ mod methods {
             add_one(3)
         }
 
-//~ MONO_ITEM fn methods::Foo::<u32>::closure_used_impl::<G>::{closure#0}
-//~ MONO_ITEM fn methods::Foo::<u64>::closure_used_impl::<G>::{closure#0}
-//~ MONO_ITEM fn methods::Foo::<u32>::closure_used_impl::<G>
-//~ MONO_ITEM fn methods::Foo::<u64>::closure_used_impl::<G>
+        //~ MONO_ITEM fn methods::Foo::<u32>::closure_used_impl::<G>::{closure#0}
+        //~ MONO_ITEM fn methods::Foo::<u64>::closure_used_impl::<G>::{closure#0}
+        //~ MONO_ITEM fn methods::Foo::<u32>::closure_used_impl::<G>
+        //~ MONO_ITEM fn methods::Foo::<u64>::closure_used_impl::<G>
 
         // Closure uses type parameter in substitutions to another function.
         pub fn closure_used_substs() {
@@ -265,15 +260,13 @@ mod methods {
             x()
         }
 
-//~ MONO_ITEM fn methods::Foo::<u32>::closure_used_substs::{closure#0}
-//~ MONO_ITEM fn methods::Foo::<u64>::closure_used_substs::{closure#0}
-//~ MONO_ITEM fn methods::Foo::<u32>::closure_used_substs
-//~ MONO_ITEM fn methods::Foo::<u64>::closure_used_substs
+        //~ MONO_ITEM fn methods::Foo::<u32>::closure_used_substs::{closure#0}
+        //~ MONO_ITEM fn methods::Foo::<u64>::closure_used_substs::{closure#0}
+        //~ MONO_ITEM fn methods::Foo::<u32>::closure_used_substs
+        //~ MONO_ITEM fn methods::Foo::<u64>::closure_used_substs
     }
 }
 
-
-
 fn dispatch<T: Default>() {
     functions::no_parameters();
     functions::unused::<T>();