2022-03-14 11:02:53 +00:00
|
|
|
error: parameter is only used in recursion
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/only_used_in_recursion.rs:11:27
|
2022-03-14 11:02:53 +00:00
|
|
|
|
|
2022-08-31 13:24:45 +00:00
|
|
|
LL | fn _one_unused(flag: u32, a: usize) -> usize {
|
|
|
|
| ^ help: if this is intentional, prefix it with an underscore: `_a`
|
2022-03-14 11:02:53 +00:00
|
|
|
|
|
2022-08-31 13:24:45 +00:00
|
|
|
note: parameter used here
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/only_used_in_recursion.rs:13:53
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
|
LL | if flag == 0 { 0 } else { _one_unused(flag - 1, a) }
|
|
|
|
| ^
|
2022-09-22 16:04:22 +00:00
|
|
|
= note: `-D clippy::only-used-in-recursion` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::only_used_in_recursion)]`
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
error: parameter is only used in recursion
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/only_used_in_recursion.rs:16:27
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
|
LL | fn _two_unused(flag: u32, a: u32, b: i32) -> usize {
|
|
|
|
| ^ help: if this is intentional, prefix it with an underscore: `_a`
|
|
|
|
|
|
|
|
|
note: parameter used here
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/only_used_in_recursion.rs:19:53
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
|
LL | if flag == 0 { 0 } else { _two_unused(flag - 1, a, b) }
|
|
|
|
| ^
|
|
|
|
|
|
|
|
error: parameter is only used in recursion
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/only_used_in_recursion.rs:16:35
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
|
LL | fn _two_unused(flag: u32, a: u32, b: i32) -> usize {
|
|
|
|
| ^ help: if this is intentional, prefix it with an underscore: `_b`
|
|
|
|
|
|
|
|
|
note: parameter used here
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/only_used_in_recursion.rs:19:56
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
|
LL | if flag == 0 { 0 } else { _two_unused(flag - 1, a, b) }
|
|
|
|
| ^
|
|
|
|
|
|
|
|
error: parameter is only used in recursion
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/only_used_in_recursion.rs:22:26
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
|
LL | fn _with_calc(flag: u32, a: i64) -> usize {
|
|
|
|
| ^ help: if this is intentional, prefix it with an underscore: `_a`
|
|
|
|
|
|
|
|
|
note: parameter used here
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/only_used_in_recursion.rs:27:32
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
|
LL | _with_calc(flag - 1, (-a + 10) * 5)
|
|
|
|
| ^
|
2022-03-14 11:02:53 +00:00
|
|
|
|
|
|
|
error: parameter is only used in recursion
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/only_used_in_recursion.rs:36:33
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
|
LL | fn _used_with_unused(flag: u32, a: i32, b: i32) -> usize {
|
|
|
|
| ^ help: if this is intentional, prefix it with an underscore: `_a`
|
|
|
|
|
|
|
|
|
note: parameter used here
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/only_used_in_recursion.rs:42:38
|
2022-03-14 11:02:53 +00:00
|
|
|
|
|
2022-08-31 13:24:45 +00:00
|
|
|
LL | _used_with_unused(flag - 1, -a, a + b)
|
|
|
|
| ^ ^
|
2022-03-14 11:02:53 +00:00
|
|
|
|
|
|
|
error: parameter is only used in recursion
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/only_used_in_recursion.rs:36:41
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
|
LL | fn _used_with_unused(flag: u32, a: i32, b: i32) -> usize {
|
|
|
|
| ^ help: if this is intentional, prefix it with an underscore: `_b`
|
|
|
|
|
|
|
|
|
note: parameter used here
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/only_used_in_recursion.rs:42:45
|
2022-03-14 11:02:53 +00:00
|
|
|
|
|
2022-08-31 13:24:45 +00:00
|
|
|
LL | _used_with_unused(flag - 1, -a, a + b)
|
|
|
|
| ^
|
2022-03-14 11:02:53 +00:00
|
|
|
|
|
|
|
error: parameter is only used in recursion
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/only_used_in_recursion.rs:46:35
|
2022-03-14 11:02:53 +00:00
|
|
|
|
|
2022-08-31 13:24:45 +00:00
|
|
|
LL | fn _codependent_unused(flag: u32, a: i32, b: i32) -> usize {
|
|
|
|
| ^ help: if this is intentional, prefix it with an underscore: `_a`
|
|
|
|
|
|
|
|
|
note: parameter used here
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/only_used_in_recursion.rs:52:39
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
|
LL | _codependent_unused(flag - 1, a * b, a + b)
|
|
|
|
| ^ ^
|
2022-03-14 11:02:53 +00:00
|
|
|
|
|
|
|
error: parameter is only used in recursion
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/only_used_in_recursion.rs:46:43
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
|
LL | fn _codependent_unused(flag: u32, a: i32, b: i32) -> usize {
|
|
|
|
| ^ help: if this is intentional, prefix it with an underscore: `_b`
|
2022-03-14 11:02:53 +00:00
|
|
|
|
|
2022-08-31 13:24:45 +00:00
|
|
|
note: parameter used here
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/only_used_in_recursion.rs:52:43
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
|
LL | _codependent_unused(flag - 1, a * b, a + b)
|
|
|
|
| ^ ^
|
2022-03-14 11:02:53 +00:00
|
|
|
|
|
|
|
error: parameter is only used in recursion
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/only_used_in_recursion.rs:56:30
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
|
LL | fn _not_primitive(flag: u32, b: String) -> usize {
|
|
|
|
| ^ help: if this is intentional, prefix it with an underscore: `_b`
|
2022-03-14 11:02:53 +00:00
|
|
|
|
|
2022-08-31 13:24:45 +00:00
|
|
|
note: parameter used here
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/only_used_in_recursion.rs:58:56
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
|
LL | if flag == 0 { 0 } else { _not_primitive(flag - 1, b) }
|
|
|
|
| ^
|
2022-03-14 11:02:53 +00:00
|
|
|
|
|
|
|
error: parameter is only used in recursion
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/only_used_in_recursion.rs:64:29
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
|
LL | fn _method(flag: usize, a: usize) -> usize {
|
|
|
|
| ^ help: if this is intentional, prefix it with an underscore: `_a`
|
|
|
|
|
|
|
|
|
note: parameter used here
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/only_used_in_recursion.rs:66:59
|
2022-03-14 11:02:53 +00:00
|
|
|
|
|
2022-08-31 13:24:45 +00:00
|
|
|
LL | if flag == 0 { 0 } else { Self::_method(flag - 1, a) }
|
|
|
|
| ^
|
2022-03-14 11:02:53 +00:00
|
|
|
|
|
|
|
error: parameter is only used in recursion
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/only_used_in_recursion.rs:69:22
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
|
LL | fn _method_self(&self, flag: usize, a: usize) -> usize {
|
|
|
|
| ^^^^
|
|
|
|
|
|
|
|
|
note: parameter used here
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/only_used_in_recursion.rs:72:35
|
2022-03-14 11:02:53 +00:00
|
|
|
|
|
2022-08-31 13:24:45 +00:00
|
|
|
LL | if flag == 0 { 0 } else { self._method_self(flag - 1, a) }
|
|
|
|
| ^^^^
|
2022-03-14 11:02:53 +00:00
|
|
|
|
|
|
|
error: parameter is only used in recursion
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/only_used_in_recursion.rs:69:41
|
2022-03-14 11:02:53 +00:00
|
|
|
|
|
2022-08-31 13:24:45 +00:00
|
|
|
LL | fn _method_self(&self, flag: usize, a: usize) -> usize {
|
|
|
|
| ^ help: if this is intentional, prefix it with an underscore: `_a`
|
|
|
|
|
|
|
|
|
note: parameter used here
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/only_used_in_recursion.rs:72:63
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
|
LL | if flag == 0 { 0 } else { self._method_self(flag - 1, a) }
|
|
|
|
| ^
|
2022-03-14 11:02:53 +00:00
|
|
|
|
|
|
|
error: parameter is only used in recursion
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/only_used_in_recursion.rs:82:26
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
|
LL | fn method(flag: u32, a: usize) -> usize {
|
|
|
|
| ^ help: if this is intentional, prefix it with an underscore: `_a`
|
2022-03-14 11:02:53 +00:00
|
|
|
|
|
2022-08-31 13:24:45 +00:00
|
|
|
note: parameter used here
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/only_used_in_recursion.rs:84:58
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
|
LL | if flag == 0 { 0 } else { Self::method(flag - 1, a) }
|
|
|
|
| ^
|
2022-03-14 11:02:53 +00:00
|
|
|
|
|
|
|
error: parameter is only used in recursion
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/only_used_in_recursion.rs:87:38
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
|
LL | fn method_self(&self, flag: u32, a: usize) -> usize {
|
|
|
|
| ^ help: if this is intentional, prefix it with an underscore: `_a`
|
2022-03-14 11:02:53 +00:00
|
|
|
|
|
2022-08-31 13:24:45 +00:00
|
|
|
note: parameter used here
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/only_used_in_recursion.rs:89:62
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
|
LL | if flag == 0 { 0 } else { self.method_self(flag - 1, a) }
|
|
|
|
| ^
|
2022-03-14 11:02:53 +00:00
|
|
|
|
|
|
|
error: parameter is only used in recursion
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/only_used_in_recursion.rs:114:26
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
|
LL | fn method(flag: u32, a: usize) -> usize {
|
|
|
|
| ^ help: if this is intentional, prefix it with an underscore: `_a`
|
|
|
|
|
|
|
|
|
note: parameter used here
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/only_used_in_recursion.rs:116:58
|
2022-03-14 11:02:53 +00:00
|
|
|
|
|
2022-08-31 13:24:45 +00:00
|
|
|
LL | if flag == 0 { 0 } else { Self::method(flag - 1, a) }
|
|
|
|
| ^
|
2022-03-14 11:02:53 +00:00
|
|
|
|
|
|
|
error: parameter is only used in recursion
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/only_used_in_recursion.rs:119:38
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
|
LL | fn method_self(&self, flag: u32, a: usize) -> usize {
|
|
|
|
| ^ help: if this is intentional, prefix it with an underscore: `_a`
|
|
|
|
|
|
|
|
|
note: parameter used here
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/only_used_in_recursion.rs:121:62
|
2022-03-14 11:02:53 +00:00
|
|
|
|
|
2022-08-31 13:24:45 +00:00
|
|
|
LL | if flag == 0 { 0 } else { self.method_self(flag - 1, a) }
|
|
|
|
| ^
|
2022-03-14 11:02:53 +00:00
|
|
|
|
2022-08-31 13:24:45 +00:00
|
|
|
error: aborting due to 16 previous errors
|
2022-03-14 11:02:53 +00:00
|
|
|
|