@@ -2,117 +2,230 @@ error: parameter is only used in recursion
22 --> $DIR/only_used_in_recursion.rs:11:27
33 |
44LL | fn _one_unused(flag: u32, a: usize) -> usize {
5- | ^
5+ | ^ help: if this is intentional, prefix it with an underscore: `_a`
66 |
77 = note: `-D clippy::only-used-in-recursion` implied by `-D warnings`
8+ note: parameter used here
9+ --> $DIR/only_used_in_recursion.rs:12:53
10+ |
11+ LL | if flag == 0 { 0 } else { _one_unused(flag - 1, a) }
12+ | ^
813
914error: parameter is only used in recursion
1015 --> $DIR/only_used_in_recursion.rs:15:27
1116 |
1217LL | fn _two_unused(flag: u32, a: u32, b: i32) -> usize {
13- | ^
18+ | ^ help: if this is intentional, prefix it with an underscore: `_a`
19+ |
20+ note: parameter used here
21+ --> $DIR/only_used_in_recursion.rs:16:53
22+ |
23+ LL | if flag == 0 { 0 } else { _two_unused(flag - 1, a, b) }
24+ | ^
1425
1526error: parameter is only used in recursion
1627 --> $DIR/only_used_in_recursion.rs:15:35
1728 |
1829LL | fn _two_unused(flag: u32, a: u32, b: i32) -> usize {
19- | ^
30+ | ^ help: if this is intentional, prefix it with an underscore: `_b`
31+ |
32+ note: parameter used here
33+ --> $DIR/only_used_in_recursion.rs:16:56
34+ |
35+ LL | if flag == 0 { 0 } else { _two_unused(flag - 1, a, b) }
36+ | ^
2037
2138error: parameter is only used in recursion
2239 --> $DIR/only_used_in_recursion.rs:19:26
2340 |
2441LL | fn _with_calc(flag: u32, a: i64) -> usize {
25- | ^
42+ | ^ help: if this is intentional, prefix it with an underscore: `_a`
43+ |
44+ note: parameter used here
45+ --> $DIR/only_used_in_recursion.rs:23:32
46+ |
47+ LL | _with_calc(flag - 1, (-a + 10) * 5)
48+ | ^
2649
2750error: parameter is only used in recursion
2851 --> $DIR/only_used_in_recursion.rs:32:33
2952 |
3053LL | fn _used_with_unused(flag: u32, a: i32, b: i32) -> usize {
31- | ^
54+ | ^ help: if this is intentional, prefix it with an underscore: `_a`
55+ |
56+ note: parameter used here
57+ --> $DIR/only_used_in_recursion.rs:36:38
58+ |
59+ LL | _used_with_unused(flag - 1, -a, a + b)
60+ | ^ ^
3261
3362error: parameter is only used in recursion
3463 --> $DIR/only_used_in_recursion.rs:32:41
3564 |
3665LL | fn _used_with_unused(flag: u32, a: i32, b: i32) -> usize {
37- | ^
66+ | ^ help: if this is intentional, prefix it with an underscore: `_b`
67+ |
68+ note: parameter used here
69+ --> $DIR/only_used_in_recursion.rs:36:45
70+ |
71+ LL | _used_with_unused(flag - 1, -a, a + b)
72+ | ^
3873
3974error: parameter is only used in recursion
4075 --> $DIR/only_used_in_recursion.rs:40:35
4176 |
4277LL | fn _codependent_unused(flag: u32, a: i32, b: i32) -> usize {
43- | ^
78+ | ^ help: if this is intentional, prefix it with an underscore: `_a`
79+ |
80+ note: parameter used here
81+ --> $DIR/only_used_in_recursion.rs:44:39
82+ |
83+ LL | _codependent_unused(flag - 1, a * b, a + b)
84+ | ^ ^
4485
4586error: parameter is only used in recursion
4687 --> $DIR/only_used_in_recursion.rs:40:43
4788 |
4889LL | fn _codependent_unused(flag: u32, a: i32, b: i32) -> usize {
49- | ^
90+ | ^ help: if this is intentional, prefix it with an underscore: `_b`
91+ |
92+ note: parameter used here
93+ --> $DIR/only_used_in_recursion.rs:44:43
94+ |
95+ LL | _codependent_unused(flag - 1, a * b, a + b)
96+ | ^ ^
5097
5198error: parameter is only used in recursion
5299 --> $DIR/only_used_in_recursion.rs:48:30
53100 |
54101LL | fn _not_primitive(flag: u32, b: String) -> usize {
55- | ^
102+ | ^ help: if this is intentional, prefix it with an underscore: `_b`
103+ |
104+ note: parameter used here
105+ --> $DIR/only_used_in_recursion.rs:49:56
106+ |
107+ LL | if flag == 0 { 0 } else { _not_primitive(flag - 1, b) }
108+ | ^
56109
57110error: parameter is only used in recursion
58111 --> $DIR/only_used_in_recursion.rs:55:29
59112 |
60113LL | fn _method(flag: usize, a: usize) -> usize {
61- | ^
114+ | ^ help: if this is intentional, prefix it with an underscore: `_a`
115+ |
116+ note: parameter used here
117+ --> $DIR/only_used_in_recursion.rs:56:59
118+ |
119+ LL | if flag == 0 { 0 } else { Self::_method(flag - 1, a) }
120+ | ^
62121
63122error: parameter is only used in recursion
64123 --> $DIR/only_used_in_recursion.rs:59:22
65124 |
66125LL | fn _method_self(&self, flag: usize, a: usize) -> usize {
67- | ^^^^
126+ | ^^^^ help: if this is intentional, prefix it with an underscore: `_self`
127+ |
128+ note: parameter used here
129+ --> $DIR/only_used_in_recursion.rs:60:35
130+ |
131+ LL | if flag == 0 { 0 } else { self._method_self(flag - 1, a) }
132+ | ^^^^
68133
69134error: parameter is only used in recursion
70135 --> $DIR/only_used_in_recursion.rs:59:41
71136 |
72137LL | fn _method_self(&self, flag: usize, a: usize) -> usize {
73- | ^
138+ | ^ help: if this is intentional, prefix it with an underscore: `_a`
139+ |
140+ note: parameter used here
141+ --> $DIR/only_used_in_recursion.rs:60:63
142+ |
143+ LL | if flag == 0 { 0 } else { self._method_self(flag - 1, a) }
144+ | ^
74145
75146error: parameter is only used in recursion
76147 --> $DIR/only_used_in_recursion.rs:70:26
77148 |
78149LL | fn method(flag: u32, a: usize) -> usize {
79- | ^
150+ | ^ help: if this is intentional, prefix it with an underscore: `_a`
151+ |
152+ note: parameter used here
153+ --> $DIR/only_used_in_recursion.rs:71:58
154+ |
155+ LL | if flag == 0 { 0 } else { Self::method(flag - 1, a) }
156+ | ^
80157
81158error: parameter is only used in recursion
82159 --> $DIR/only_used_in_recursion.rs:74:38
83160 |
84161LL | fn method_self(&self, flag: u32, a: usize) -> usize {
85- | ^
162+ | ^ help: if this is intentional, prefix it with an underscore: `_a`
163+ |
164+ note: parameter used here
165+ --> $DIR/only_used_in_recursion.rs:75:62
166+ |
167+ LL | if flag == 0 { 0 } else { self.method_self(flag - 1, a) }
168+ | ^
86169
87170error: parameter is only used in recursion
88171 --> $DIR/only_used_in_recursion.rs:100:26
89172 |
90173LL | fn method(flag: u32, a: usize) -> usize {
91- | ^
174+ | ^ help: if this is intentional, prefix it with an underscore: `_a`
175+ |
176+ note: parameter used here
177+ --> $DIR/only_used_in_recursion.rs:101:58
178+ |
179+ LL | if flag == 0 { 0 } else { Self::method(flag - 1, a) }
180+ | ^
92181
93182error: parameter is only used in recursion
94183 --> $DIR/only_used_in_recursion.rs:104:38
95184 |
96185LL | fn method_self(&self, flag: u32, a: usize) -> usize {
97- | ^
186+ | ^ help: if this is intentional, prefix it with an underscore: `_a`
187+ |
188+ note: parameter used here
189+ --> $DIR/only_used_in_recursion.rs:105:62
190+ |
191+ LL | if flag == 0 { 0 } else { self.method_self(flag - 1, a) }
192+ | ^
98193
99194error: parameter is only used in recursion
100195 --> $DIR/only_used_in_recursion.rs:113:35
101196 |
102197LL | fn _with_inner(flag: u32, a: u32, b: u32) -> usize {
103- | ^
198+ | ^ help: if this is intentional, prefix it with an underscore: `_b`
199+ |
200+ note: parameter used here
201+ --> $DIR/only_used_in_recursion.rs:119:52
202+ |
203+ LL | if flag == 0 { 0 } else { _with_inner(flag, a, b + x) }
204+ | ^
104205
105206error: parameter is only used in recursion
106207 --> $DIR/only_used_in_recursion.rs:114:25
107208 |
108209LL | fn inner(flag: u32, a: u32) -> u32 {
109- | ^
210+ | ^ help: if this is intentional, prefix it with an underscore: `_a`
211+ |
212+ note: parameter used here
213+ --> $DIR/only_used_in_recursion.rs:115:47
214+ |
215+ LL | if flag == 0 { 0 } else { inner(flag, a) }
216+ | ^
110217
111218error: parameter is only used in recursion
112219 --> $DIR/only_used_in_recursion.rs:122:34
113220 |
114221LL | fn _with_closure(a: Option<u32>, b: u32, f: impl Fn(u32, u32) -> Option<u32>) -> u32 {
115- | ^
222+ | ^ help: if this is intentional, prefix it with an underscore: `_b`
223+ |
224+ note: parameter used here
225+ --> $DIR/only_used_in_recursion.rs:124:32
226+ |
227+ LL | _with_closure(Some(x), b, f)
228+ | ^
116229
117230error: aborting due to 19 previous errors
118231
0 commit comments