Skip to content

Commit 13b737d

Browse files
committed
[fn_params_excessive_bools] whitelist in signle function in test
1 parent 9e1c7fe commit 13b737d

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

tests/ui/fn_params_excessive_bools.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ struct S;
2525
trait Trait {
2626
fn f(_: bool, _: bool, _: bool, _: bool);
2727
fn g(_: bool, _: bool, _: bool, _: Vec<u32>);
28+
#[allow(clippy::fn_params_excessive_bools)]
29+
fn h(_: bool, _: bool, _: bool, _: bool, _: bool, _: bool);
2830
}
2931

3032
impl S {
@@ -39,6 +41,7 @@ impl Trait for S {
3941
// We only lint in the trait definition
4042
fn f(_: bool, _: bool, _: bool, _: bool) {}
4143
fn g(_: bool, _: bool, _: bool, _: Vec<u32>) {}
44+
fn h(_: bool, _: bool, _: bool, _: bool, _: bool, _: bool) {}
4245
}
4346

4447
fn main() {

tests/ui/fn_params_excessive_bools.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ LL | fn t(_: S, _: S, _: Box<S>, _: Vec<u32>, _: bool, _: bool, _: bool, _: bool
1616
= help: consider refactoring bools into two-variant enums
1717

1818
error: more than 3 bools in function parameters
19-
--> $DIR/fn_params_excessive_bools.rs:31:5
19+
--> $DIR/fn_params_excessive_bools.rs:33:5
2020
|
2121
LL | fn f(&self, _: bool, _: bool, _: bool, _: bool) {}
2222
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2323
|
2424
= help: consider refactoring bools into two-variant enums
2525

2626
error: more than 3 bools in function parameters
27-
--> $DIR/fn_params_excessive_bools.rs:45:5
27+
--> $DIR/fn_params_excessive_bools.rs:48:5
2828
|
2929
LL | / fn n(_: bool, _: u32, _: bool, _: Box<u32>, _: bool, _: bool) {
3030
LL | | fn nn(_: bool, _: bool, _: bool, _: bool) {}
@@ -34,7 +34,7 @@ LL | | }
3434
= help: consider refactoring bools into two-variant enums
3535

3636
error: more than 3 bools in function parameters
37-
--> $DIR/fn_params_excessive_bools.rs:46:9
37+
--> $DIR/fn_params_excessive_bools.rs:49:9
3838
|
3939
LL | fn nn(_: bool, _: bool, _: bool, _: bool) {}
4040
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)