]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/match_bool.stderr
iterate List by value
[rust.git] / tests / ui / match_bool.stderr
index 9bef0d823e2c5c89db291d86df7b412b79d49a06..1ad78c740c68bf104e9b3fd8a6e9fc1b84cc6703 100644 (file)
 error: this boolean expression can be simplified
-  --> $DIR/match_bool.rs:35:11
+  --> $DIR/match_bool.rs:31:11
    |
-35 |     match test && test {
+LL |     match test && test {
    |           ^^^^^^^^^^^^ help: try: `test`
    |
    = note: `-D clippy::nonminimal-bool` implied by `-D warnings`
 
 error: you seem to be trying to match on a boolean expression
-  --> $DIR/match_bool.rs:14:5
+  --> $DIR/match_bool.rs:6:5
    |
-14 | /     match test {
-15 | |         true => 0,
-16 | |         false => 42,
-17 | |     };
-   | |_____^ help: consider using an if/else expression: `if test { 0 } else { 42 }`
+LL | /     match test {
+LL | |         true => 0,
+LL | |         false => 42,
+LL | |     };
+   | |_____^ help: consider using an `if`/`else` expression: `if test { 0 } else { 42 }`
    |
-   = note: `-D clippy::match-bool` implied by `-D warnings`
+note: the lint level is defined here
+  --> $DIR/match_bool.rs:1:9
+   |
+LL | #![deny(clippy::match_bool)]
+   |         ^^^^^^^^^^^^^^^^^^
 
 error: you seem to be trying to match on a boolean expression
-  --> $DIR/match_bool.rs:20:5
+  --> $DIR/match_bool.rs:12:5
    |
-20 | /     match option == 1 {
-21 | |         true => 1,
-22 | |         false => 0,
-23 | |     };
-   | |_____^ help: consider using an if/else expression: `if option == 1 { 1 } else { 0 }`
+LL | /     match option == 1 {
+LL | |         true => 1,
+LL | |         false => 0,
+LL | |     };
+   | |_____^ help: consider using an `if`/`else` expression: `if option == 1 { 1 } else { 0 }`
 
 error: you seem to be trying to match on a boolean expression
-  --> $DIR/match_bool.rs:25:5
+  --> $DIR/match_bool.rs:17:5
+   |
+LL | /     match test {
+LL | |         true => (),
+LL | |         false => {
+LL | |             println!("Noooo!");
+LL | |         },
+LL | |     };
+   | |_____^
+   |
+help: consider using an `if`/`else` expression
+   |
+LL |     if !test {
+LL |         println!("Noooo!");
+LL |     };
    |
-25 | /     match test {
-26 | |         true => (),
-27 | |         false => { println!("Noooo!"); }
-28 | |     };
-   | |_____^ help: consider using an if/else expression: `if !test { println!("Noooo!"); }`
 
 error: you seem to be trying to match on a boolean expression
-  --> $DIR/match_bool.rs:30:5
+  --> $DIR/match_bool.rs:24:5
+   |
+LL | /     match test {
+LL | |         false => {
+LL | |             println!("Noooo!");
+LL | |         },
+LL | |         _ => (),
+LL | |     };
+   | |_____^
+   |
+help: consider using an `if`/`else` expression
+   |
+LL |     if !test {
+LL |         println!("Noooo!");
+LL |     };
    |
-30 | /     match test {
-31 | |         false => { println!("Noooo!"); }
-32 | |         _ => (),
-33 | |     };
-   | |_____^ help: consider using an if/else expression: `if !test { println!("Noooo!"); }`
 
 error: you seem to be trying to match on a boolean expression
-  --> $DIR/match_bool.rs:35:5
+  --> $DIR/match_bool.rs:31:5
+   |
+LL | /     match test && test {
+LL | |         false => {
+LL | |             println!("Noooo!");
+LL | |         },
+LL | |         _ => (),
+LL | |     };
+   | |_____^
+   |
+help: consider using an `if`/`else` expression
+   |
+LL |     if !(test && test) {
+LL |         println!("Noooo!");
+LL |     };
    |
-35 | /     match test && test {
-36 | |         false => { println!("Noooo!"); }
-37 | |         _ => (),
-38 | |     };
-   | |_____^ help: consider using an if/else expression: `if !(test && test) { println!("Noooo!"); }`
 
 error: equal expressions as operands to `&&`
-  --> $DIR/match_bool.rs:35:11
+  --> $DIR/match_bool.rs:31:11
    |
-35 |     match test && test {
+LL |     match test && test {
    |           ^^^^^^^^^^^^
    |
-   = note: #[deny(clippy::eq_op)] on by default
+   = note: `#[deny(clippy::eq_op)]` on by default
 
 error: you seem to be trying to match on a boolean expression
-  --> $DIR/match_bool.rs:40:5
+  --> $DIR/match_bool.rs:38:5
+   |
+LL | /     match test {
+LL | |         false => {
+LL | |             println!("Noooo!");
+LL | |         },
+...  |
+LL | |         },
+LL | |     };
+   | |_____^
+   |
+help: consider using an `if`/`else` expression
+   |
+LL |     if test {
+LL |         println!("Yes!");
+LL |     } else {
+LL |         println!("Noooo!");
+LL |     };
    |
-40 | /     match test {
-41 | |         false => { println!("Noooo!"); }
-42 | |         true => { println!("Yes!"); }
-43 | |     };
-   | |_____^ help: consider using an if/else expression: `if test { println!("Yes!"); } else { println!("Noooo!"); }`
 
 error: aborting due to 8 previous errors