about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2018-12-08 18:56:59 +0100
committerMatthias Krüger <matthias.krueger@famsik.de>2018-12-09 17:21:49 +0100
commit4583d781562a1cff374992f64f85e9113391acd3 (patch)
tree1d3d1c3759e50e081bacdb09a81ada5d6808a084
parent5b01f7a0d6be3ed7485dc6421d0cffa456b63ade (diff)
downloadrust-4583d781562a1cff374992f64f85e9113391acd3.tar.gz
rust-4583d781562a1cff374992f64f85e9113391acd3.zip
add rustfmt::skip attributes to some tests
-rw-r--r--tests/ui/absurd-extreme-comparisons.rs5
-rw-r--r--tests/ui/arithmetic.rs5
-rw-r--r--tests/ui/collapsible_if.rs4
-rw-r--r--tests/ui/cyclomatic_complexity.rs4
-rw-r--r--tests/ui/doc.rs5
-rw-r--r--tests/ui/double_parens.rs5
-rw-r--r--tests/ui/empty_line_after_outer_attribute.rs2
-rw-r--r--tests/ui/eq_op.rs6
-rw-r--r--tests/ui/format.rs1
-rw-r--r--tests/ui/methods.rs21
-rw-r--r--tests/ui/replace_consts.rs4
-rw-r--r--tests/ui/unused_unit.rs3
12 files changed, 25 insertions, 40 deletions
diff --git a/tests/ui/absurd-extreme-comparisons.rs b/tests/ui/absurd-extreme-comparisons.rs
index b219cb0397b..a93027162e5 100644
--- a/tests/ui/absurd-extreme-comparisons.rs
+++ b/tests/ui/absurd-extreme-comparisons.rs
@@ -7,13 +7,10 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-
-
-
-
 #![warn(clippy::absurd_extreme_comparisons)]
 #![allow(unused, clippy::eq_op, clippy::no_effect, clippy::unnecessary_operation, clippy::needless_pass_by_value)]
 
+#[rustfmt::skip]
 fn main() {
     const Z: u32 = 0;
     let u: u32 = 42;
diff --git a/tests/ui/arithmetic.rs b/tests/ui/arithmetic.rs
index 61a601468fb..39aef5a4a56 100644
--- a/tests/ui/arithmetic.rs
+++ b/tests/ui/arithmetic.rs
@@ -8,11 +8,10 @@
 // except according to those terms.
 
 
-
-
-
 #![warn(clippy::integer_arithmetic, clippy::float_arithmetic)]
 #![allow(unused, clippy::shadow_reuse, clippy::shadow_unrelated, clippy::no_effect, clippy::unnecessary_operation)]
+
+#[rustfmt::skip]
 fn main() {
     let i = 1i32;
     1 + i;
diff --git a/tests/ui/collapsible_if.rs b/tests/ui/collapsible_if.rs
index a8ec13ab669..bd6e0c07946 100644
--- a/tests/ui/collapsible_if.rs
+++ b/tests/ui/collapsible_if.rs
@@ -8,9 +8,7 @@
 // except according to those terms.
 
 
-
-
-
+#[rustfmt::skip]
 #[warn(clippy::collapsible_if)]
 fn main() {
     let x = "hello";
diff --git a/tests/ui/cyclomatic_complexity.rs b/tests/ui/cyclomatic_complexity.rs
index 35451a99acc..a9a2391f150 100644
--- a/tests/ui/cyclomatic_complexity.rs
+++ b/tests/ui/cyclomatic_complexity.rs
@@ -8,12 +8,11 @@
 // except according to those terms.
 
 
-
-
 #![allow(clippy::all)]
 #![warn(clippy::cyclomatic_complexity)]
 #![allow(unused)]
 
+#[rustfmt::skip]
 fn main() {
     if true {
         println!("a");
@@ -362,6 +361,7 @@ fn early() -> Result<i32, &'static str> {
     return Ok(5);
 }
 
+#[rustfmt::skip]
 #[clippy::cyclomatic_complexity = "0"]
 fn early_ret() -> i32 {
     let a = if true { 42 } else { return 0; };
diff --git a/tests/ui/doc.rs b/tests/ui/doc.rs
index d87142e9367..dde1a471e6e 100644
--- a/tests/ui/doc.rs
+++ b/tests/ui/doc.rs
@@ -7,13 +7,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-
-
-
 //! This file tests for the DOC_MARKDOWN lint
 
-
-
 #![allow(dead_code)]
 #![warn(clippy::doc_markdown)]
 
diff --git a/tests/ui/double_parens.rs b/tests/ui/double_parens.rs
index be1676a7487..773179b2d46 100644
--- a/tests/ui/double_parens.rs
+++ b/tests/ui/double_parens.rs
@@ -7,13 +7,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-
-
-
-
 #![warn(clippy::double_parens)]
 #![allow(dead_code)]
-
 fn dummy_fn<T>(_: T) {}
 
 struct DummyStruct;
diff --git a/tests/ui/empty_line_after_outer_attribute.rs b/tests/ui/empty_line_after_outer_attribute.rs
index 43105b6e342..ede1244df7e 100644
--- a/tests/ui/empty_line_after_outer_attribute.rs
+++ b/tests/ui/empty_line_after_outer_attribute.rs
@@ -7,8 +7,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-
-
 #![warn(clippy::empty_line_after_outer_attr)]
 
 // This should produce a warning
diff --git a/tests/ui/eq_op.rs b/tests/ui/eq_op.rs
index 36c54b0f42e..020c7d795a4 100644
--- a/tests/ui/eq_op.rs
+++ b/tests/ui/eq_op.rs
@@ -7,10 +7,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-
-
-
-
+#[rustfmt::skip]
 #[warn(clippy::eq_op)]
 #[allow(clippy::identity_op, clippy::double_parens, clippy::many_single_char_names)]
 #[allow(clippy::no_effect, unused_variables, clippy::unnecessary_operation, clippy::short_circuit_statement)]
@@ -107,6 +104,7 @@ fn main() {
     const D: u32 = A / A;
 }
 
+#[rustfmt::skip]
 macro_rules! check_if_named_foo {
     ($expression:expr) => (
         if stringify!($expression) == "foo" {
diff --git a/tests/ui/format.rs b/tests/ui/format.rs
index e314d3022da..6b1577e24ca 100644
--- a/tests/ui/format.rs
+++ b/tests/ui/format.rs
@@ -8,7 +8,6 @@
 // except according to those terms.
 
 
-
 #![allow(clippy::print_literal)]
 #![warn(clippy::useless_format)]
 
diff --git a/tests/ui/methods.rs b/tests/ui/methods.rs
index 03bd7e1f084..877026d4bb1 100644
--- a/tests/ui/methods.rs
+++ b/tests/ui/methods.rs
@@ -7,14 +7,21 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-
-
-
-
 #![warn(clippy::all, clippy::pedantic, clippy::option_unwrap_used)]
-#![allow(clippy::blacklisted_name, unused, clippy::print_stdout, clippy::non_ascii_literal, clippy::new_without_default,
-    clippy::new_without_default_derive, clippy::missing_docs_in_private_items, clippy::needless_pass_by_value,
-    clippy::default_trait_access, clippy::use_self, clippy::new_ret_no_self, clippy::useless_format)]
+#![allow(
+    clippy::blacklisted_name,
+    unused,
+    clippy::print_stdout,
+    clippy::non_ascii_literal,
+    clippy::new_without_default,
+    clippy::new_without_default_derive,
+    clippy::missing_docs_in_private_items,
+    clippy::needless_pass_by_value,
+    clippy::default_trait_access,
+    clippy::use_self,
+    clippy::new_ret_no_self,
+    clippy::useless_format
+)]
 
 use std::collections::BTreeMap;
 use std::collections::HashMap;
diff --git a/tests/ui/replace_consts.rs b/tests/ui/replace_consts.rs
index 7a2584f174d..7da1f212a75 100644
--- a/tests/ui/replace_consts.rs
+++ b/tests/ui/replace_consts.rs
@@ -8,8 +8,6 @@
 // except according to those terms.
 
 
-
-
 #![feature(integer_atomics)]
 #![allow(clippy::blacklisted_name)]
 #![deny(clippy::replace_consts)]
@@ -17,6 +15,7 @@
 use std::sync::atomic::*;
 use std::sync::{ONCE_INIT, Once};
 
+#[rustfmt::skip]
 fn bad() {
     // Once
     { let foo = ONCE_INIT; };
@@ -60,6 +59,7 @@ fn bad() {
     { let foo = std::u128::MAX; };
 }
 
+#[rustfmt::skip]
 fn good() {
     // Once
     { let foo = Once::new(); };
diff --git a/tests/ui/unused_unit.rs b/tests/ui/unused_unit.rs
index 3930eecf1b7..88f0b9687be 100644
--- a/tests/ui/unused_unit.rs
+++ b/tests/ui/unused_unit.rs
@@ -16,12 +16,10 @@
 // stripping away any starting or ending parenthesis characters—hence this
 // test of the JSON error format.
 
-
 #![deny(clippy::unused_unit)]
 #![allow(clippy::needless_return)]
 
 struct Unitter;
-
 impl Unitter {
     // try to disorient the lint with multiple unit returns and newlines
     pub fn get_unit<F: Fn() -> (), G>(&self, f: F, _g: G) ->
@@ -33,6 +31,7 @@ impl Unitter {
 }
 
 impl Into<()> for Unitter {
+    #[rustfmt::skip]
     fn into(self) -> () {
         ()
     }