about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Wright <mikerite@lavabit.com>2019-02-27 07:41:07 +0200
committerMichael Wright <mikerite@lavabit.com>2019-02-27 07:41:07 +0200
commit11682b4cd2a7ccc3f9d4a4007dd8d93397c86cbe (patch)
treeb5c954969b345139eac671a9a455b647d083f7c0
parent6e8931c5f5d72a324d06ea36216c0156fbefaac1 (diff)
downloadrust-11682b4cd2a7ccc3f9d4a4007dd8d93397c86cbe.tar.gz
rust-11682b4cd2a7ccc3f9d4a4007dd8d93397c86cbe.zip
Add `rustfmt::skip` to outer attr format tests
-rwxr-xr-xci/base-tests.sh2
-rw-r--r--tests/ui/empty_line_after_outer_attribute.rs3
-rw-r--r--tests/ui/empty_line_after_outer_attribute.stderr12
3 files changed, 10 insertions, 7 deletions
diff --git a/ci/base-tests.sh b/ci/base-tests.sh
index ff14072d591..37754972b87 100755
--- a/ci/base-tests.sh
+++ b/ci/base-tests.sh
@@ -59,7 +59,7 @@ rustup override set nightly
 # avoid loop spam and allow cmds with exit status != 0
 set +ex
 
-for file in `find tests -not -path "tests/ui/empty_line_after_outer_attribute.rs" -not -path "tests/ui/double_parens.rs" -not -path "tests/ui/doc.rs" -not -path "tests/ui/unused_unit.rs" | grep "\.rs$"` ; do
+for file in `find tests -not -path "tests/ui/double_parens.rs" -not -path "tests/ui/doc.rs" -not -path "tests/ui/unused_unit.rs" | grep "\.rs$"` ; do
   rustfmt ${file} --check
   if [ $? -ne 0 ]; then
     echo "${file} needs reformatting!"
diff --git a/tests/ui/empty_line_after_outer_attribute.rs b/tests/ui/empty_line_after_outer_attribute.rs
index b43dc200825..5343dff9da1 100644
--- a/tests/ui/empty_line_after_outer_attribute.rs
+++ b/tests/ui/empty_line_after_outer_attribute.rs
@@ -1,5 +1,8 @@
 #![warn(clippy::empty_line_after_outer_attr)]
 #![allow(clippy::assertions_on_constants)]
+#![feature(custom_inner_attributes)]
+#![rustfmt::skip]
+
 // This should produce a warning
 #[crate_type = "lib"]
 
diff --git a/tests/ui/empty_line_after_outer_attribute.stderr b/tests/ui/empty_line_after_outer_attribute.stderr
index 0fb8dd8dbb1..72692310391 100644
--- a/tests/ui/empty_line_after_outer_attribute.stderr
+++ b/tests/ui/empty_line_after_outer_attribute.stderr
@@ -1,5 +1,5 @@
 error: Found an empty line after an outer attribute. Perhaps you forgot to add a '!' to make it an inner attribute?
-  --> $DIR/empty_line_after_outer_attribute.rs:4:1
+  --> $DIR/empty_line_after_outer_attribute.rs:7:1
    |
 LL | / #[crate_type = "lib"]
 LL | |
@@ -10,7 +10,7 @@ LL | | fn with_one_newline_and_comment() { assert!(true) }
    = note: `-D clippy::empty-line-after-outer-attr` implied by `-D warnings`
 
 error: Found an empty line after an outer attribute. Perhaps you forgot to add a '!' to make it an inner attribute?
-  --> $DIR/empty_line_after_outer_attribute.rs:16:1
+  --> $DIR/empty_line_after_outer_attribute.rs:19:1
    |
 LL | / #[crate_type = "lib"]
 LL | |
@@ -18,7 +18,7 @@ LL | | fn with_one_newline() { assert!(true) }
    | |_
 
 error: Found an empty line after an outer attribute. Perhaps you forgot to add a '!' to make it an inner attribute?
-  --> $DIR/empty_line_after_outer_attribute.rs:21:1
+  --> $DIR/empty_line_after_outer_attribute.rs:24:1
    |
 LL | / #[crate_type = "lib"]
 LL | |
@@ -27,7 +27,7 @@ LL | | fn with_two_newlines() { assert!(true) }
    | |_
 
 error: Found an empty line after an outer attribute. Perhaps you forgot to add a '!' to make it an inner attribute?
-  --> $DIR/empty_line_after_outer_attribute.rs:28:1
+  --> $DIR/empty_line_after_outer_attribute.rs:31:1
    |
 LL | / #[crate_type = "lib"]
 LL | |
@@ -35,7 +35,7 @@ LL | | enum Baz {
    | |_
 
 error: Found an empty line after an outer attribute. Perhaps you forgot to add a '!' to make it an inner attribute?
-  --> $DIR/empty_line_after_outer_attribute.rs:36:1
+  --> $DIR/empty_line_after_outer_attribute.rs:39:1
    |
 LL | / #[crate_type = "lib"]
 LL | |
@@ -43,7 +43,7 @@ LL | | struct Foo {
    | |_
 
 error: Found an empty line after an outer attribute. Perhaps you forgot to add a '!' to make it an inner attribute?
-  --> $DIR/empty_line_after_outer_attribute.rs:44:1
+  --> $DIR/empty_line_after_outer_attribute.rs:47:1
    |
 LL | / #[crate_type = "lib"]
 LL | |