mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-15 01:17:16 +00:00
195 lines
7.2 KiB
Text
195 lines
7.2 KiB
Text
error: parameter is only used in recursion
|
|
--> $DIR/only_used_in_recursion.rs:11:27
|
|
|
|
|
LL | fn _one_unused(flag: u32, a: usize) -> usize {
|
|
| ^ help: if this is intentional, prefix it with an underscore: `_a`
|
|
|
|
|
note: parameter used here
|
|
--> $DIR/only_used_in_recursion.rs:12:53
|
|
|
|
|
LL | if flag == 0 { 0 } else { _one_unused(flag - 1, a) }
|
|
| ^
|
|
= note: `-D clippy::only-used-in-recursion` implied by `-D warnings`
|
|
|
|
error: parameter is only used in recursion
|
|
--> $DIR/only_used_in_recursion.rs:15:27
|
|
|
|
|
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
|
|
--> $DIR/only_used_in_recursion.rs:16:53
|
|
|
|
|
LL | if flag == 0 { 0 } else { _two_unused(flag - 1, a, b) }
|
|
| ^
|
|
|
|
error: parameter is only used in recursion
|
|
--> $DIR/only_used_in_recursion.rs:15:35
|
|
|
|
|
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
|
|
--> $DIR/only_used_in_recursion.rs:16:56
|
|
|
|
|
LL | if flag == 0 { 0 } else { _two_unused(flag - 1, a, b) }
|
|
| ^
|
|
|
|
error: parameter is only used in recursion
|
|
--> $DIR/only_used_in_recursion.rs:19:26
|
|
|
|
|
LL | fn _with_calc(flag: u32, a: i64) -> usize {
|
|
| ^ help: if this is intentional, prefix it with an underscore: `_a`
|
|
|
|
|
note: parameter used here
|
|
--> $DIR/only_used_in_recursion.rs:23:32
|
|
|
|
|
LL | _with_calc(flag - 1, (-a + 10) * 5)
|
|
| ^
|
|
|
|
error: parameter is only used in recursion
|
|
--> $DIR/only_used_in_recursion.rs:32:33
|
|
|
|
|
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
|
|
--> $DIR/only_used_in_recursion.rs:36:38
|
|
|
|
|
LL | _used_with_unused(flag - 1, -a, a + b)
|
|
| ^ ^
|
|
|
|
error: parameter is only used in recursion
|
|
--> $DIR/only_used_in_recursion.rs:32:41
|
|
|
|
|
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
|
|
--> $DIR/only_used_in_recursion.rs:36:45
|
|
|
|
|
LL | _used_with_unused(flag - 1, -a, a + b)
|
|
| ^
|
|
|
|
error: parameter is only used in recursion
|
|
--> $DIR/only_used_in_recursion.rs:40:35
|
|
|
|
|
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
|
|
--> $DIR/only_used_in_recursion.rs:44:39
|
|
|
|
|
LL | _codependent_unused(flag - 1, a * b, a + b)
|
|
| ^ ^
|
|
|
|
error: parameter is only used in recursion
|
|
--> $DIR/only_used_in_recursion.rs:40:43
|
|
|
|
|
LL | fn _codependent_unused(flag: u32, a: i32, b: i32) -> usize {
|
|
| ^ help: if this is intentional, prefix it with an underscore: `_b`
|
|
|
|
|
note: parameter used here
|
|
--> $DIR/only_used_in_recursion.rs:44:43
|
|
|
|
|
LL | _codependent_unused(flag - 1, a * b, a + b)
|
|
| ^ ^
|
|
|
|
error: parameter is only used in recursion
|
|
--> $DIR/only_used_in_recursion.rs:48:30
|
|
|
|
|
LL | fn _not_primitive(flag: u32, b: String) -> usize {
|
|
| ^ help: if this is intentional, prefix it with an underscore: `_b`
|
|
|
|
|
note: parameter used here
|
|
--> $DIR/only_used_in_recursion.rs:49:56
|
|
|
|
|
LL | if flag == 0 { 0 } else { _not_primitive(flag - 1, b) }
|
|
| ^
|
|
|
|
error: parameter is only used in recursion
|
|
--> $DIR/only_used_in_recursion.rs:55:29
|
|
|
|
|
LL | fn _method(flag: usize, a: usize) -> usize {
|
|
| ^ help: if this is intentional, prefix it with an underscore: `_a`
|
|
|
|
|
note: parameter used here
|
|
--> $DIR/only_used_in_recursion.rs:56:59
|
|
|
|
|
LL | if flag == 0 { 0 } else { Self::_method(flag - 1, a) }
|
|
| ^
|
|
|
|
error: parameter is only used in recursion
|
|
--> $DIR/only_used_in_recursion.rs:59:22
|
|
|
|
|
LL | fn _method_self(&self, flag: usize, a: usize) -> usize {
|
|
| ^^^^
|
|
|
|
|
note: parameter used here
|
|
--> $DIR/only_used_in_recursion.rs:60:35
|
|
|
|
|
LL | if flag == 0 { 0 } else { self._method_self(flag - 1, a) }
|
|
| ^^^^
|
|
|
|
error: parameter is only used in recursion
|
|
--> $DIR/only_used_in_recursion.rs:59:41
|
|
|
|
|
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
|
|
--> $DIR/only_used_in_recursion.rs:60:63
|
|
|
|
|
LL | if flag == 0 { 0 } else { self._method_self(flag - 1, a) }
|
|
| ^
|
|
|
|
error: parameter is only used in recursion
|
|
--> $DIR/only_used_in_recursion.rs:70:26
|
|
|
|
|
LL | fn method(flag: u32, a: usize) -> usize {
|
|
| ^ help: if this is intentional, prefix it with an underscore: `_a`
|
|
|
|
|
note: parameter used here
|
|
--> $DIR/only_used_in_recursion.rs:71:58
|
|
|
|
|
LL | if flag == 0 { 0 } else { Self::method(flag - 1, a) }
|
|
| ^
|
|
|
|
error: parameter is only used in recursion
|
|
--> $DIR/only_used_in_recursion.rs:74:38
|
|
|
|
|
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
|
|
--> $DIR/only_used_in_recursion.rs:75:62
|
|
|
|
|
LL | if flag == 0 { 0 } else { self.method_self(flag - 1, a) }
|
|
| ^
|
|
|
|
error: parameter is only used in recursion
|
|
--> $DIR/only_used_in_recursion.rs:100:26
|
|
|
|
|
LL | fn method(flag: u32, a: usize) -> usize {
|
|
| ^ help: if this is intentional, prefix it with an underscore: `_a`
|
|
|
|
|
note: parameter used here
|
|
--> $DIR/only_used_in_recursion.rs:101:58
|
|
|
|
|
LL | if flag == 0 { 0 } else { Self::method(flag - 1, a) }
|
|
| ^
|
|
|
|
error: parameter is only used in recursion
|
|
--> $DIR/only_used_in_recursion.rs:104:38
|
|
|
|
|
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
|
|
--> $DIR/only_used_in_recursion.rs:105:62
|
|
|
|
|
LL | if flag == 0 { 0 } else { self.method_self(flag - 1, a) }
|
|
| ^
|
|
|
|
error: aborting due to 16 previous errors
|
|
|