diff --git a/ci/base-tests.sh b/ci/base-tests.sh index 37754972b..d2b959a2d 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/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/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/double_parens.rs b/tests/ui/double_parens.rs index c6f9bf77e..9c7590c7d 100644 --- a/tests/ui/double_parens.rs +++ b/tests/ui/double_parens.rs @@ -1,5 +1,8 @@ #![warn(clippy::double_parens)] #![allow(dead_code)] +#![feature(custom_inner_attributes)] +#![rustfmt::skip] + fn dummy_fn(_: T) {} struct DummyStruct; diff --git a/tests/ui/double_parens.stderr b/tests/ui/double_parens.stderr index 6336b1c25..0e4c9b568 100644 --- a/tests/ui/double_parens.stderr +++ b/tests/ui/double_parens.stderr @@ -1,5 +1,5 @@ error: Consider removing unnecessary double parentheses - --> $DIR/double_parens.rs:12:5 + --> $DIR/double_parens.rs:15:5 | LL | ((0)) | ^^^^^ @@ -7,31 +7,31 @@ LL | ((0)) = note: `-D clippy::double-parens` implied by `-D warnings` error: Consider removing unnecessary double parentheses - --> $DIR/double_parens.rs:16:14 + --> $DIR/double_parens.rs:19:14 | LL | dummy_fn((0)); | ^^^ error: Consider removing unnecessary double parentheses - --> $DIR/double_parens.rs:20:20 + --> $DIR/double_parens.rs:23:20 | LL | x.dummy_method((0)); | ^^^ error: Consider removing unnecessary double parentheses - --> $DIR/double_parens.rs:24:5 + --> $DIR/double_parens.rs:27:5 | LL | ((1, 2)) | ^^^^^^^^ error: Consider removing unnecessary double parentheses - --> $DIR/double_parens.rs:28:5 + --> $DIR/double_parens.rs:31:5 | LL | (()) | ^^^^ error: Consider removing unnecessary double parentheses - --> $DIR/double_parens.rs:50:16 + --> $DIR/double_parens.rs:53:16 | LL | assert_eq!(((1, 2)), (1, 2), "Error"); | ^^^^^^^^