]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/match_bool.stderr
Auto merge of #68717 - petrochenkov:stabexpat, r=varkor
[rust.git] / tests / ui / match_bool.stderr
index 89378f438b0249af78d93c939730efa85c655f93..1ad78c740c68bf104e9b3fd8a6e9fc1b84cc6703 100644 (file)
 error: this boolean expression can be simplified
-  --> $DIR/match_bool.rs:25:11
+  --> $DIR/match_bool.rs:31:11
    |
-25 |     match test && test {
+LL |     match test && test {
    |           ^^^^^^^^^^^^ help: try: `test`
    |
-   = note: `-D nonminimal-bool` implied by `-D warnings`
+   = 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:4:5
-  |
-4 | /     match test {
-5 | |         true => 0,
-6 | |         false => 42,
-7 | |     };
-  | |_____^ help: consider using an if/else expression: `if test { 0 } else { 42 }`
-  |
-  = note: `-D match-bool` implied by `-D warnings`
+  --> $DIR/match_bool.rs:6:5
+   |
+LL | /     match test {
+LL | |         true => 0,
+LL | |         false => 42,
+LL | |     };
+   | |_____^ help: consider using an `if`/`else` expression: `if test { 0 } else { 42 }`
+   |
+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:10:5
+  --> $DIR/match_bool.rs:12:5
    |
-10 | /     match option == 1 {
-11 | |         true => 1,
-12 | |         false => 0,
-13 | |     };
-   | |_____^ 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:15: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 |     };
    |
-15 | /     match test {
-16 | |         true => (),
-17 | |         false => { println!("Noooo!"); }
-18 | |     };
-   | |_____^ 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:20: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 |     };
    |
-20 | /     match test {
-21 | |         false => { println!("Noooo!"); }
-22 | |         _ => (),
-23 | |     };
-   | |_____^ 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:25: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 |     };
    |
-25 | /     match test && test {
-26 | |         false => { println!("Noooo!"); }
-27 | |         _ => (),
-28 | |     };
-   | |_____^ help: consider using an if/else expression: `if !(test && test) { println!("Noooo!"); }`
 
 error: equal expressions as operands to `&&`
-  --> $DIR/match_bool.rs:25:11
+  --> $DIR/match_bool.rs:31:11
    |
-25 |     match test && test {
+LL |     match test && test {
    |           ^^^^^^^^^^^^
    |
-   = note: #[deny(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:30: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 |     };
    |
-30 | /     match test {
-31 | |         false => { println!("Noooo!"); }
-32 | |         true => { println!("Yes!"); }
-33 | |     };
-   | |_____^ help: consider using an if/else expression: `if test { println!("Yes!"); } else { println!("Noooo!"); }`
 
 error: aborting due to 8 previous errors