Skip to content

Commit

Permalink
allow clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
bend-n committed Mar 7, 2025
1 parent 9ec94aa commit 43d26ff
Show file tree
Hide file tree
Showing 12 changed files with 68 additions and 65 deletions.
1 change: 1 addition & 0 deletions src/tools/clippy/tests/ui/blocks_in_conditions.fixed
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#![warn(clippy::blocks_in_conditions)]
#![allow(
unused,
redundant_transmutation,
clippy::let_and_return,
clippy::needless_if,
clippy::missing_transmute_annotations
Expand Down
1 change: 1 addition & 0 deletions src/tools/clippy/tests/ui/blocks_in_conditions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#![warn(clippy::blocks_in_conditions)]
#![allow(
unused,
redundant_transmutation,
clippy::let_and_return,
clippy::needless_if,
clippy::missing_transmute_annotations
Expand Down
8 changes: 4 additions & 4 deletions src/tools/clippy/tests/ui/blocks_in_conditions.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: in an `if` condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a `let`
--> tests/ui/blocks_in_conditions.rs:30:5
--> tests/ui/blocks_in_conditions.rs:31:5
|
LL | / if {
LL | |
Expand All @@ -20,13 +20,13 @@ LL ~ }; if res {
|

error: omit braces around single expression condition
--> tests/ui/blocks_in_conditions.rs:42:8
--> tests/ui/blocks_in_conditions.rs:43:8
|
LL | if { true } { 6 } else { 10 }
| ^^^^^^^^ help: try: `true`

error: this boolean expression can be simplified
--> tests/ui/blocks_in_conditions.rs:48:8
--> tests/ui/blocks_in_conditions.rs:49:8
|
LL | if true && x == 3 { 6 } else { 10 }
| ^^^^^^^^^^^^^^ help: try: `x == 3`
Expand All @@ -35,7 +35,7 @@ LL | if true && x == 3 { 6 } else { 10 }
= help: to override `-D warnings` add `#[allow(clippy::nonminimal_bool)]`

error: in a `match` scrutinee, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a `let`
--> tests/ui/blocks_in_conditions.rs:76:5
--> tests/ui/blocks_in_conditions.rs:77:5
|
LL | / match {
LL | |
Expand Down
2 changes: 1 addition & 1 deletion src/tools/clippy/tests/ui/crashes/ice-1782.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//@ check-pass

#![allow(dead_code, unused_variables)]
#![allow(dead_code, unused_variables, redundant_transmutation)]
#![allow(clippy::unnecessary_cast, clippy::missing_transmute_annotations)]

/// Should not trigger an ICE in `SpanlessEq` / `consts::constant`
Expand Down
1 change: 1 addition & 0 deletions src/tools/clippy/tests/ui/transmute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#![allow(
dead_code,
clippy::borrow_as_ptr,
redundant_transmutation,
clippy::needless_lifetimes,
clippy::missing_transmute_annotations
)]
Expand Down
Loading

0 comments on commit 43d26ff

Please sign in to comment.