Add rustfmt::skip to double_parens tests

This commit is contained in:
Michael Wright 2019-02-28 08:02:45 +02:00
parent ff2798840c
commit 6e6e39b4a8
3 changed files with 10 additions and 7 deletions

View file

@ -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!"

View file

@ -1,5 +1,8 @@
#![warn(clippy::double_parens)]
#![allow(dead_code)]
#![feature(custom_inner_attributes)]
#![rustfmt::skip]
fn dummy_fn<T>(_: T) {}
struct DummyStruct;

View file

@ -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");
| ^^^^^^^^