1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
error: parameter is only used in recursion
--> $DIR/only_used_in_recursion2.rs:3:35
|
LL | fn _with_inner(flag: u32, a: u32, b: u32) -> usize {
| ^ help: if this is intentional, prefix it with an underscore: `_b`
|
= note: `-D clippy::only-used-in-recursion` implied by `-D warnings`
note: parameter used here
--> $DIR/only_used_in_recursion2.rs:9:52
|
LL | if flag == 0 { 0 } else { _with_inner(flag, a, b + x) }
| ^
error: parameter is only used in recursion
--> $DIR/only_used_in_recursion2.rs:4:25
|
LL | fn inner(flag: u32, a: u32) -> u32 {
| ^ help: if this is intentional, prefix it with an underscore: `_a`
|
note: parameter used here
--> $DIR/only_used_in_recursion2.rs:5:47
|
LL | if flag == 0 { 0 } else { inner(flag, a) }
| ^
error: parameter is only used in recursion
--> $DIR/only_used_in_recursion2.rs:12:34
|
LL | fn _with_closure(a: Option<u32>, b: u32, f: impl Fn(u32, u32) -> Option<u32>) -> u32 {
| ^ help: if this is intentional, prefix it with an underscore: `_b`
|
note: parameter used here
--> $DIR/only_used_in_recursion2.rs:14:32
|
LL | _with_closure(Some(x), b, f)
| ^
error: parameter is only used in recursion
--> $DIR/only_used_in_recursion2.rs:62:37
|
LL | fn overwritten_param(flag: u32, mut a: usize) -> usize {
| ^ help: if this is intentional, prefix it with an underscore: `_a`
|
note: parameter used here
--> $DIR/only_used_in_recursion2.rs:70:29
|
LL | overwritten_param(flag, a)
| ^
error: parameter is only used in recursion
--> $DIR/only_used_in_recursion2.rs:73:32
|
LL | fn field_direct(flag: u32, mut a: (usize,)) -> usize {
| ^ help: if this is intentional, prefix it with an underscore: `_a`
|
note: parameter used here
--> $DIR/only_used_in_recursion2.rs:78:32
|
LL | field_direct(flag - 1, a)
| ^
error: aborting due to 5 previous errors
|