fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error: this boolean expression can be simplified 2 --> $DIR/match_bool.rs:36:11 3 | 4LL | match test && test { 5 | ^^^^^^^^^^^^ help: try: `test` 6 | 7 = note: `-D clippy::nonminimal-bool` implied by `-D warnings` 8 = help: to override `-D warnings` add `#[allow(clippy::nonminimal_bool)]` 9 10error: you seem to be trying to match on a boolean expression 11 --> $DIR/match_bool.rs:7:5 12 | 13LL | / match test { 14LL | | 15LL | | true => 0, 16LL | | false => 42, 17LL | | }; 18 | |_____^ help: consider using an `if`/`else` expression: `if test { 0 } else { 42 }` 19 | 20note: the lint level is defined here 21 --> $DIR/match_bool.rs:2:9 22 | 23LL | #![deny(clippy::match_bool)] 24 | ^^^^^^^^^^^^^^^^^^ 25 26error: you seem to be trying to match on a boolean expression 27 --> $DIR/match_bool.rs:14:5 28 | 29LL | / match option == 1 { 30LL | | 31LL | | true => 1, 32LL | | false => 0, 33LL | | }; 34 | |_____^ help: consider using an `if`/`else` expression: `if option == 1 { 1 } else { 0 }` 35 36error: you seem to be trying to match on a boolean expression 37 --> $DIR/match_bool.rs:20:5 38 | 39LL | / match test { 40LL | | 41LL | | true => (), 42LL | | false => { 43LL | | println!("Noooo!"); 44LL | | }, 45LL | | }; 46 | |_____^ 47 | 48help: consider using an `if`/`else` expression 49 | 50LL ~ if !test { 51LL + println!("Noooo!"); 52LL ~ }; 53 | 54 55error: you seem to be trying to match on a boolean expression 56 --> $DIR/match_bool.rs:28:5 57 | 58LL | / match test { 59LL | | 60LL | | false => { 61LL | | println!("Noooo!"); 62LL | | }, 63LL | | _ => (), 64LL | | }; 65 | |_____^ 66 | 67help: consider using an `if`/`else` expression 68 | 69LL ~ if !test { 70LL + println!("Noooo!"); 71LL ~ }; 72 | 73 74error: you seem to be trying to match on a boolean expression 75 --> $DIR/match_bool.rs:36:5 76 | 77LL | / match test && test { 78LL | | 79LL | | 80LL | | 81... | 82LL | | _ => (), 83LL | | }; 84 | |_____^ 85 | 86help: consider using an `if`/`else` expression 87 | 88LL ~ if !(test && test) { 89LL + println!("Noooo!"); 90LL ~ }; 91 | 92 93error: equal expressions as operands to `&&` 94 --> $DIR/match_bool.rs:36:11 95 | 96LL | match test && test { 97 | ^^^^^^^^^^^^ 98 | 99 = note: `#[deny(clippy::eq_op)]` on by default 100 101error: you seem to be trying to match on a boolean expression 102 --> $DIR/match_bool.rs:48:5 103 | 104LL | / match test { 105LL | | 106LL | | false => { 107LL | | println!("Noooo!"); 108... | 109LL | | }, 110LL | | }; 111 | |_____^ 112 | 113help: consider using an `if`/`else` expression 114 | 115LL ~ if test { 116LL + println!("Yes!"); 117LL + } else { 118LL + println!("Noooo!"); 119LL ~ }; 120 | 121 122error: aborting due to 8 previous errors 123