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