2022-08-31 13:24:45 +00:00
|
|
|
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: parameter used here
|
2023-07-28 19:35:48 +00:00
|
|
|
--> $DIR/only_used_in_recursion2.rs:11:52
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
|
LL | if flag == 0 { 0 } else { _with_inner(flag, a, b + x) }
|
|
|
|
| ^
|
2022-09-22 16:04:22 +00:00
|
|
|
= note: `-D clippy::only-used-in-recursion` implied by `-D warnings`
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
error: parameter is only used in recursion
|
2023-07-28 19:35:48 +00:00
|
|
|
--> $DIR/only_used_in_recursion2.rs:5:25
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
|
LL | fn inner(flag: u32, a: u32) -> u32 {
|
|
|
|
| ^ help: if this is intentional, prefix it with an underscore: `_a`
|
|
|
|
|
|
|
|
|
note: parameter used here
|
2023-07-28 19:35:48 +00:00
|
|
|
--> $DIR/only_used_in_recursion2.rs:7:47
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
|
LL | if flag == 0 { 0 } else { inner(flag, a) }
|
|
|
|
| ^
|
|
|
|
|
|
|
|
error: parameter is only used in recursion
|
2023-07-28 19:35:48 +00:00
|
|
|
--> $DIR/only_used_in_recursion2.rs:14:34
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
|
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
|
2023-07-28 19:35:48 +00:00
|
|
|
--> $DIR/only_used_in_recursion2.rs:17:32
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
|
LL | _with_closure(Some(x), b, f)
|
|
|
|
| ^
|
|
|
|
|
|
|
|
error: parameter is only used in recursion
|
2023-07-28 19:35:48 +00:00
|
|
|
--> $DIR/only_used_in_recursion2.rs:65:37
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
|
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
|
2023-07-28 19:35:48 +00:00
|
|
|
--> $DIR/only_used_in_recursion2.rs:74:29
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
|
LL | overwritten_param(flag, a)
|
|
|
|
| ^
|
|
|
|
|
|
|
|
error: parameter is only used in recursion
|
2023-07-28 19:35:48 +00:00
|
|
|
--> $DIR/only_used_in_recursion2.rs:77:32
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
|
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
|
2023-07-28 19:35:48 +00:00
|
|
|
--> $DIR/only_used_in_recursion2.rs:83:32
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
|
LL | field_direct(flag - 1, a)
|
|
|
|
| ^
|
|
|
|
|
|
|
|
error: aborting due to 5 previous errors
|
|
|
|
|