tests: if_same_then_else2: Ignore single_element_loop lint
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
This commit is contained in:
parent
ec23db9496
commit
ba1ca19c3b
@ -3,7 +3,8 @@
|
|||||||
clippy::blacklisted_name,
|
clippy::blacklisted_name,
|
||||||
clippy::collapsible_if,
|
clippy::collapsible_if,
|
||||||
clippy::ifs_same_cond,
|
clippy::ifs_same_cond,
|
||||||
clippy::needless_return
|
clippy::needless_return,
|
||||||
|
clippy::single_element_loop
|
||||||
)]
|
)]
|
||||||
|
|
||||||
fn if_same_then_else2() -> Result<&'static str, ()> {
|
fn if_same_then_else2() -> Result<&'static str, ()> {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
error: this `if` has identical blocks
|
error: this `if` has identical blocks
|
||||||
--> $DIR/if_same_then_else2.rs:19:12
|
--> $DIR/if_same_then_else2.rs:20:12
|
||||||
|
|
|
|
||||||
LL | } else {
|
LL | } else {
|
||||||
| ____________^
|
| ____________^
|
||||||
@ -13,7 +13,7 @@ LL | | }
|
|||||||
|
|
|
|
||||||
= note: `-D clippy::if-same-then-else` implied by `-D warnings`
|
= note: `-D clippy::if-same-then-else` implied by `-D warnings`
|
||||||
note: same as this
|
note: same as this
|
||||||
--> $DIR/if_same_then_else2.rs:10:13
|
--> $DIR/if_same_then_else2.rs:11:13
|
||||||
|
|
|
|
||||||
LL | if true {
|
LL | if true {
|
||||||
| _____________^
|
| _____________^
|
||||||
@ -26,7 +26,7 @@ LL | | } else {
|
|||||||
| |_____^
|
| |_____^
|
||||||
|
|
||||||
error: this `if` has identical blocks
|
error: this `if` has identical blocks
|
||||||
--> $DIR/if_same_then_else2.rs:33:12
|
--> $DIR/if_same_then_else2.rs:34:12
|
||||||
|
|
|
|
||||||
LL | } else {
|
LL | } else {
|
||||||
| ____________^
|
| ____________^
|
||||||
@ -36,7 +36,7 @@ LL | | }
|
|||||||
| |_____^
|
| |_____^
|
||||||
|
|
|
|
||||||
note: same as this
|
note: same as this
|
||||||
--> $DIR/if_same_then_else2.rs:31:13
|
--> $DIR/if_same_then_else2.rs:32:13
|
||||||
|
|
|
|
||||||
LL | if true {
|
LL | if true {
|
||||||
| _____________^
|
| _____________^
|
||||||
@ -45,7 +45,7 @@ LL | | } else {
|
|||||||
| |_____^
|
| |_____^
|
||||||
|
|
||||||
error: this `if` has identical blocks
|
error: this `if` has identical blocks
|
||||||
--> $DIR/if_same_then_else2.rs:40:12
|
--> $DIR/if_same_then_else2.rs:41:12
|
||||||
|
|
|
|
||||||
LL | } else {
|
LL | } else {
|
||||||
| ____________^
|
| ____________^
|
||||||
@ -55,7 +55,7 @@ LL | | }
|
|||||||
| |_____^
|
| |_____^
|
||||||
|
|
|
|
||||||
note: same as this
|
note: same as this
|
||||||
--> $DIR/if_same_then_else2.rs:38:13
|
--> $DIR/if_same_then_else2.rs:39:13
|
||||||
|
|
|
|
||||||
LL | if true {
|
LL | if true {
|
||||||
| _____________^
|
| _____________^
|
||||||
@ -64,7 +64,7 @@ LL | | } else {
|
|||||||
| |_____^
|
| |_____^
|
||||||
|
|
||||||
error: this `if` has identical blocks
|
error: this `if` has identical blocks
|
||||||
--> $DIR/if_same_then_else2.rs:90:12
|
--> $DIR/if_same_then_else2.rs:91:12
|
||||||
|
|
|
|
||||||
LL | } else {
|
LL | } else {
|
||||||
| ____________^
|
| ____________^
|
||||||
@ -74,7 +74,7 @@ LL | | };
|
|||||||
| |_____^
|
| |_____^
|
||||||
|
|
|
|
||||||
note: same as this
|
note: same as this
|
||||||
--> $DIR/if_same_then_else2.rs:88:21
|
--> $DIR/if_same_then_else2.rs:89:21
|
||||||
|
|
|
|
||||||
LL | let _ = if true {
|
LL | let _ = if true {
|
||||||
| _____________________^
|
| _____________________^
|
||||||
@ -83,7 +83,7 @@ LL | | } else {
|
|||||||
| |_____^
|
| |_____^
|
||||||
|
|
||||||
error: this `if` has identical blocks
|
error: this `if` has identical blocks
|
||||||
--> $DIR/if_same_then_else2.rs:97:12
|
--> $DIR/if_same_then_else2.rs:98:12
|
||||||
|
|
|
|
||||||
LL | } else {
|
LL | } else {
|
||||||
| ____________^
|
| ____________^
|
||||||
@ -93,7 +93,7 @@ LL | | }
|
|||||||
| |_____^
|
| |_____^
|
||||||
|
|
|
|
||||||
note: same as this
|
note: same as this
|
||||||
--> $DIR/if_same_then_else2.rs:95:13
|
--> $DIR/if_same_then_else2.rs:96:13
|
||||||
|
|
|
|
||||||
LL | if true {
|
LL | if true {
|
||||||
| _____________^
|
| _____________^
|
||||||
@ -102,7 +102,7 @@ LL | | } else {
|
|||||||
| |_____^
|
| |_____^
|
||||||
|
|
||||||
error: this `if` has identical blocks
|
error: this `if` has identical blocks
|
||||||
--> $DIR/if_same_then_else2.rs:122:12
|
--> $DIR/if_same_then_else2.rs:123:12
|
||||||
|
|
|
|
||||||
LL | } else {
|
LL | } else {
|
||||||
| ____________^
|
| ____________^
|
||||||
@ -112,7 +112,7 @@ LL | | }
|
|||||||
| |_____^
|
| |_____^
|
||||||
|
|
|
|
||||||
note: same as this
|
note: same as this
|
||||||
--> $DIR/if_same_then_else2.rs:119:20
|
--> $DIR/if_same_then_else2.rs:120:20
|
||||||
|
|
|
|
||||||
LL | } else if true {
|
LL | } else if true {
|
||||||
| ____________________^
|
| ____________________^
|
||||||
|
Loading…
x
Reference in New Issue
Block a user