about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--tests/ui/decimal_literal_representation.rs7
-rw-r--r--tests/ui/decimal_literal_representation.stderr20
-rw-r--r--tests/ui/implicit_hasher.rs4
-rw-r--r--tests/ui/implicit_hasher.stderr4
-rw-r--r--tests/ui/swap.rs5
-rw-r--r--tests/ui/swap.stderr32
6 files changed, 36 insertions, 36 deletions
diff --git a/tests/ui/decimal_literal_representation.rs b/tests/ui/decimal_literal_representation.rs
index c196b27a3a6..d7823b0b819 100644
--- a/tests/ui/decimal_literal_representation.rs
+++ b/tests/ui/decimal_literal_representation.rs
@@ -9,9 +9,9 @@
 
 #[warn(clippy::decimal_literal_representation)]
 #[allow(unused_variables)]
+#[rustfmt::skip]
 fn main() {
-    let good = (
-        // Hex:
+    let good = (       // Hex:
         127,           // 0x7F
         256,           // 0x100
         511,           // 0x1FF
@@ -21,8 +21,7 @@ fn main() {
         61_683,        // 0xF0F3
         2_131_750_925, // 0x7F0F_F00D
     );
-    let bad = (
-        // Hex:
+    let bad = (        // Hex:
         32_773,        // 0x8005
         65_280,        // 0xFF00
         2_131_750_927, // 0x7F0F_F00F
diff --git a/tests/ui/decimal_literal_representation.stderr b/tests/ui/decimal_literal_representation.stderr
index 42f8a6e3bc5..c68a25f3dc3 100644
--- a/tests/ui/decimal_literal_representation.stderr
+++ b/tests/ui/decimal_literal_representation.stderr
@@ -1,33 +1,33 @@
 error: integer literal has a better hexadecimal representation
-  --> $DIR/decimal_literal_representation.rs:26:9
+  --> $DIR/decimal_literal_representation.rs:25:9
    |
-26 |         32_773,        // 0x8005
+25 |         32_773,        // 0x8005
    |         ^^^^^^ help: consider: `0x8005`
    |
    = note: `-D clippy::decimal-literal-representation` implied by `-D warnings`
 
 error: integer literal has a better hexadecimal representation
-  --> $DIR/decimal_literal_representation.rs:27:9
+  --> $DIR/decimal_literal_representation.rs:26:9
    |
-27 |         65_280,        // 0xFF00
+26 |         65_280,        // 0xFF00
    |         ^^^^^^ help: consider: `0xFF00`
 
 error: integer literal has a better hexadecimal representation
-  --> $DIR/decimal_literal_representation.rs:28:9
+  --> $DIR/decimal_literal_representation.rs:27:9
    |
-28 |         2_131_750_927, // 0x7F0F_F00F
+27 |         2_131_750_927, // 0x7F0F_F00F
    |         ^^^^^^^^^^^^^ help: consider: `0x7F0F_F00F`
 
 error: integer literal has a better hexadecimal representation
-  --> $DIR/decimal_literal_representation.rs:29:9
+  --> $DIR/decimal_literal_representation.rs:28:9
    |
-29 |         2_147_483_647, // 0x7FFF_FFFF
+28 |         2_147_483_647, // 0x7FFF_FFFF
    |         ^^^^^^^^^^^^^ help: consider: `0x7FFF_FFFF`
 
 error: integer literal has a better hexadecimal representation
-  --> $DIR/decimal_literal_representation.rs:30:9
+  --> $DIR/decimal_literal_representation.rs:29:9
    |
-30 |         4_042_322_160, // 0xF0F0_F0F0
+29 |         4_042_322_160, // 0xF0F0_F0F0
    |         ^^^^^^^^^^^^^ help: consider: `0xF0F0_F0F0`
 
 error: aborting due to 5 previous errors
diff --git a/tests/ui/implicit_hasher.rs b/tests/ui/implicit_hasher.rs
index ddcd8bcd755..acd5a52ff38 100644
--- a/tests/ui/implicit_hasher.rs
+++ b/tests/ui/implicit_hasher.rs
@@ -85,8 +85,8 @@ macro_rules! gen {
         pub fn $name(_map: &mut HashMap<i32, i32>, _set: &mut HashSet<i32>) {}
     };
 }
-
-gen!(impl );
+#[rustfmt::skip]
+gen!(impl);
 gen!(fn bar);
 
 // When the macro is in a different file, the suggestion spans can't be combined properly
diff --git a/tests/ui/implicit_hasher.stderr b/tests/ui/implicit_hasher.stderr
index 58b823e6ca1..35306e77aec 100644
--- a/tests/ui/implicit_hasher.stderr
+++ b/tests/ui/implicit_hasher.stderr
@@ -96,8 +96,8 @@ error: impl for `HashMap` should be generalized over different hashers
 77 |         impl<K: Hash + Eq, V> Foo<u8> for HashMap<K, V> {
    |                                           ^^^^^^^^^^^^^
 ...
-89 | gen!(impl );
-   | ------------ in this macro invocation
+89 | gen!(impl);
+   | ----------- in this macro invocation
 help: consider adding a type parameter
    |
 77 |         impl<K: Hash + Eq, V, S: ::std::hash::BuildHasher + Default> Foo<u8> for HashMap<K, V, S> {
diff --git a/tests/ui/swap.rs b/tests/ui/swap.rs
index e9f227d47a0..20fa9c87574 100644
--- a/tests/ui/swap.rs
+++ b/tests/ui/swap.rs
@@ -39,6 +39,7 @@ fn vec() {
     foo.swap(0, 1);
 }
 
+#[rustfmt::skip]
 fn main() {
     array();
     slice();
@@ -50,7 +51,7 @@ fn main() {
     a = b;
     b = a;
 
-;    let t = a;
+    ; let t = a;
     a = b;
     b = t;
 
@@ -59,7 +60,7 @@ fn main() {
     c.0 = a;
     a = c.0;
 
-;    let t = c.0;
+    ; let t = c.0;
     c.0 = a;
     a = t;
 }
diff --git a/tests/ui/swap.stderr b/tests/ui/swap.stderr
index 12d012442ad..c8e803c4afd 100644
--- a/tests/ui/swap.stderr
+++ b/tests/ui/swap.stderr
@@ -25,42 +25,42 @@ error: this looks like you are swapping elements of `foo` manually
    | |_________________^ help: try: `foo.swap(0, 1)`
 
 error: this looks like you are swapping `a` and `b` manually
-  --> $DIR/swap.rs:53:6
+  --> $DIR/swap.rs:54:7
    |
-53 |   ;    let t = a;
-   |  ______^
-54 | |     a = b;
-55 | |     b = t;
+54 |       ; let t = a;
+   |  _______^
+55 | |     a = b;
+56 | |     b = t;
    | |_________^ help: try: `std::mem::swap(&mut a, &mut b)`
    |
    = note: or maybe you should use `std::mem::replace`?
 
 error: this looks like you are swapping `c.0` and `a` manually
-  --> $DIR/swap.rs:62:6
+  --> $DIR/swap.rs:63:7
    |
-62 |   ;    let t = c.0;
-   |  ______^
-63 | |     c.0 = a;
-64 | |     a = t;
+63 |       ; let t = c.0;
+   |  _______^
+64 | |     c.0 = a;
+65 | |     a = t;
    | |_________^ help: try: `std::mem::swap(&mut c.0, &mut a)`
    |
    = note: or maybe you should use `std::mem::replace`?
 
 error: this looks like you are trying to swap `a` and `b`
-  --> $DIR/swap.rs:50:5
+  --> $DIR/swap.rs:51:5
    |
-50 | /     a = b;
-51 | |     b = a;
+51 | /     a = b;
+52 | |     b = a;
    | |_________^ help: try: `std::mem::swap(&mut a, &mut b)`
    |
    = note: `-D clippy::almost-swapped` implied by `-D warnings`
    = note: or maybe you should use `std::mem::replace`?
 
 error: this looks like you are trying to swap `c.0` and `a`
-  --> $DIR/swap.rs:59:5
+  --> $DIR/swap.rs:60:5
    |
-59 | /     c.0 = a;
-60 | |     a = c.0;
+60 | /     c.0 = a;
+61 | |     a = c.0;
    | |___________^ help: try: `std::mem::swap(&mut c.0, &mut a)`
    |
    = note: or maybe you should use `std::mem::replace`?