]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/only_used_in_recursion.stderr
Rollup merge of #102345 - chenyukang:fix-102182-impl-trait, r=estebank
[rust.git] / src / tools / clippy / tests / ui / only_used_in_recursion.stderr
1 error: parameter is only used in recursion
2   --> $DIR/only_used_in_recursion.rs:11:27
3    |
4 LL | fn _one_unused(flag: u32, a: usize) -> usize {
5    |                           ^ help: if this is intentional, prefix it with an underscore: `_a`
6    |
7 note: parameter used here
8   --> $DIR/only_used_in_recursion.rs:12:53
9    |
10 LL |     if flag == 0 { 0 } else { _one_unused(flag - 1, a) }
11    |                                                     ^
12    = note: `-D clippy::only-used-in-recursion` implied by `-D warnings`
13
14 error: parameter is only used in recursion
15   --> $DIR/only_used_in_recursion.rs:15:27
16    |
17 LL | fn _two_unused(flag: u32, a: u32, b: i32) -> usize {
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    |                                                     ^
25
26 error: parameter is only used in recursion
27   --> $DIR/only_used_in_recursion.rs:15:35
28    |
29 LL | fn _two_unused(flag: u32, a: u32, b: i32) -> usize {
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    |                                                        ^
37
38 error: parameter is only used in recursion
39   --> $DIR/only_used_in_recursion.rs:19:26
40    |
41 LL | fn _with_calc(flag: u32, a: i64) -> usize {
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    |                                ^
49
50 error: parameter is only used in recursion
51   --> $DIR/only_used_in_recursion.rs:32:33
52    |
53 LL | fn _used_with_unused(flag: u32, a: i32, b: i32) -> usize {
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    |                                      ^  ^
61
62 error: parameter is only used in recursion
63   --> $DIR/only_used_in_recursion.rs:32:41
64    |
65 LL | fn _used_with_unused(flag: u32, a: i32, b: i32) -> usize {
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    |                                             ^
73
74 error: parameter is only used in recursion
75   --> $DIR/only_used_in_recursion.rs:40:35
76    |
77 LL | fn _codependent_unused(flag: u32, a: i32, b: i32) -> usize {
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    |                                       ^      ^
85
86 error: parameter is only used in recursion
87   --> $DIR/only_used_in_recursion.rs:40:43
88    |
89 LL | fn _codependent_unused(flag: u32, a: i32, b: i32) -> usize {
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    |                                           ^      ^
97
98 error: parameter is only used in recursion
99   --> $DIR/only_used_in_recursion.rs:48:30
100    |
101 LL | fn _not_primitive(flag: u32, b: String) -> usize {
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    |                                                        ^
109
110 error: parameter is only used in recursion
111   --> $DIR/only_used_in_recursion.rs:55:29
112    |
113 LL |     fn _method(flag: usize, a: usize) -> usize {
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    |                                                           ^
121
122 error: parameter is only used in recursion
123   --> $DIR/only_used_in_recursion.rs:59:22
124    |
125 LL |     fn _method_self(&self, flag: usize, a: usize) -> usize {
126    |                      ^^^^
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    |                                   ^^^^
133
134 error: parameter is only used in recursion
135   --> $DIR/only_used_in_recursion.rs:59:41
136    |
137 LL |     fn _method_self(&self, flag: usize, a: usize) -> usize {
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    |                                                               ^
145
146 error: parameter is only used in recursion
147   --> $DIR/only_used_in_recursion.rs:70:26
148    |
149 LL |     fn method(flag: u32, a: usize) -> usize {
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    |                                                          ^
157
158 error: parameter is only used in recursion
159   --> $DIR/only_used_in_recursion.rs:74:38
160    |
161 LL |     fn method_self(&self, flag: u32, a: usize) -> usize {
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    |                                                              ^
169
170 error: parameter is only used in recursion
171   --> $DIR/only_used_in_recursion.rs:100:26
172    |
173 LL |     fn method(flag: u32, a: usize) -> usize {
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    |                                                          ^
181
182 error: parameter is only used in recursion
183   --> $DIR/only_used_in_recursion.rs:104:38
184    |
185 LL |     fn method_self(&self, flag: u32, a: usize) -> usize {
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    |                                                              ^
193
194 error: aborting due to 16 previous errors
195