-error: You checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
+error: you checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`
--> $DIR/complex_conditionals.rs:8:9
|
LL | if x.is_ok() && y.is_err() {
LL | #![deny(clippy::panicking_unwrap, clippy::unnecessary_unwrap)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: This call to `unwrap_err()` will always panic.
+error: this call to `unwrap_err()` will always panic
--> $DIR/complex_conditionals.rs:9:9
|
LL | if x.is_ok() && y.is_err() {
LL | #![deny(clippy::panicking_unwrap, clippy::unnecessary_unwrap)]
| ^^^^^^^^^^^^^^^^^^^^^^^^
-error: This call to `unwrap()` will always panic.
+error: this call to `unwrap()` will always panic
--> $DIR/complex_conditionals.rs:10:9
|
LL | if x.is_ok() && y.is_err() {
LL | y.unwrap(); // will panic
| ^^^^^^^^^^
-error: You checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
+error: you checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`
--> $DIR/complex_conditionals.rs:11:9
|
LL | if x.is_ok() && y.is_err() {
LL | y.unwrap_err(); // unnecessary
| ^^^^^^^^^^^^^^
-error: This call to `unwrap()` will always panic.
+error: this call to `unwrap()` will always panic
--> $DIR/complex_conditionals.rs:25:9
|
LL | if x.is_ok() || y.is_ok() {
LL | x.unwrap(); // will panic
| ^^^^^^^^^^
-error: You checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
+error: you checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`
--> $DIR/complex_conditionals.rs:26:9
|
LL | if x.is_ok() || y.is_ok() {
LL | x.unwrap_err(); // unnecessary
| ^^^^^^^^^^^^^^
-error: This call to `unwrap()` will always panic.
+error: this call to `unwrap()` will always panic
--> $DIR/complex_conditionals.rs:27:9
|
LL | if x.is_ok() || y.is_ok() {
LL | y.unwrap(); // will panic
| ^^^^^^^^^^
-error: You checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
+error: you checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`
--> $DIR/complex_conditionals.rs:28:9
|
LL | if x.is_ok() || y.is_ok() {
LL | y.unwrap_err(); // unnecessary
| ^^^^^^^^^^^^^^
-error: You checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
+error: you checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`
--> $DIR/complex_conditionals.rs:32:9
|
LL | if x.is_ok() && !(y.is_ok() || z.is_err()) {
LL | x.unwrap(); // unnecessary
| ^^^^^^^^^^
-error: This call to `unwrap_err()` will always panic.
+error: this call to `unwrap_err()` will always panic
--> $DIR/complex_conditionals.rs:33:9
|
LL | if x.is_ok() && !(y.is_ok() || z.is_err()) {
LL | x.unwrap_err(); // will panic
| ^^^^^^^^^^^^^^
-error: This call to `unwrap()` will always panic.
+error: this call to `unwrap()` will always panic
--> $DIR/complex_conditionals.rs:34:9
|
LL | if x.is_ok() && !(y.is_ok() || z.is_err()) {
LL | y.unwrap(); // will panic
| ^^^^^^^^^^
-error: You checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
+error: you checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`
--> $DIR/complex_conditionals.rs:35:9
|
LL | if x.is_ok() && !(y.is_ok() || z.is_err()) {
LL | y.unwrap_err(); // unnecessary
| ^^^^^^^^^^^^^^
-error: You checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
+error: you checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`
--> $DIR/complex_conditionals.rs:36:9
|
LL | if x.is_ok() && !(y.is_ok() || z.is_err()) {
LL | z.unwrap(); // unnecessary
| ^^^^^^^^^^
-error: This call to `unwrap_err()` will always panic.
+error: this call to `unwrap_err()` will always panic
--> $DIR/complex_conditionals.rs:37:9
|
LL | if x.is_ok() && !(y.is_ok() || z.is_err()) {
LL | z.unwrap_err(); // will panic
| ^^^^^^^^^^^^^^
-error: This call to `unwrap()` will always panic.
+error: this call to `unwrap()` will always panic
--> $DIR/complex_conditionals.rs:45:9
|
LL | if x.is_ok() || !(y.is_ok() && z.is_err()) {
LL | x.unwrap(); // will panic
| ^^^^^^^^^^
-error: You checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
+error: you checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`
--> $DIR/complex_conditionals.rs:46:9
|
LL | if x.is_ok() || !(y.is_ok() && z.is_err()) {
LL | x.unwrap_err(); // unnecessary
| ^^^^^^^^^^^^^^
-error: You checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
+error: you checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`
--> $DIR/complex_conditionals.rs:47:9
|
LL | if x.is_ok() || !(y.is_ok() && z.is_err()) {
LL | y.unwrap(); // unnecessary
| ^^^^^^^^^^
-error: This call to `unwrap_err()` will always panic.
+error: this call to `unwrap_err()` will always panic
--> $DIR/complex_conditionals.rs:48:9
|
LL | if x.is_ok() || !(y.is_ok() && z.is_err()) {
LL | y.unwrap_err(); // will panic
| ^^^^^^^^^^^^^^
-error: This call to `unwrap()` will always panic.
+error: this call to `unwrap()` will always panic
--> $DIR/complex_conditionals.rs:49:9
|
LL | if x.is_ok() || !(y.is_ok() && z.is_err()) {
LL | z.unwrap(); // will panic
| ^^^^^^^^^^
-error: You checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
+error: you checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`
--> $DIR/complex_conditionals.rs:50:9
|
LL | if x.is_ok() || !(y.is_ok() && z.is_err()) {
-error: You checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
+error: you checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`
--> $DIR/simple_conditionals.rs:39:9
|
LL | if x.is_some() {
LL | #![deny(clippy::panicking_unwrap, clippy::unnecessary_unwrap)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: This call to `unwrap()` will always panic.
+error: this call to `unwrap()` will always panic
--> $DIR/simple_conditionals.rs:41:9
|
LL | if x.is_some() {
LL | #![deny(clippy::panicking_unwrap, clippy::unnecessary_unwrap)]
| ^^^^^^^^^^^^^^^^^^^^^^^^
-error: This call to `unwrap()` will always panic.
+error: this call to `unwrap()` will always panic
--> $DIR/simple_conditionals.rs:44:9
|
LL | if x.is_none() {
LL | x.unwrap(); // will panic
| ^^^^^^^^^^
-error: You checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
+error: you checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`
--> $DIR/simple_conditionals.rs:46:9
|
LL | if x.is_none() {
LL | x.unwrap(); // unnecessary
| ^^^^^^^^^^
-error: You checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
+error: you checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`
--> $DIR/simple_conditionals.rs:7:13
|
LL | if $a.is_some() {
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
-error: You checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
+error: you checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`
--> $DIR/simple_conditionals.rs:54:9
|
LL | if x.is_ok() {
LL | x.unwrap(); // unnecessary
| ^^^^^^^^^^
-error: This call to `unwrap_err()` will always panic.
+error: this call to `unwrap_err()` will always panic
--> $DIR/simple_conditionals.rs:55:9
|
LL | if x.is_ok() {
LL | x.unwrap_err(); // will panic
| ^^^^^^^^^^^^^^
-error: This call to `unwrap()` will always panic.
+error: this call to `unwrap()` will always panic
--> $DIR/simple_conditionals.rs:57:9
|
LL | if x.is_ok() {
LL | x.unwrap(); // will panic
| ^^^^^^^^^^
-error: You checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
+error: you checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`
--> $DIR/simple_conditionals.rs:58:9
|
LL | if x.is_ok() {
LL | x.unwrap_err(); // unnecessary
| ^^^^^^^^^^^^^^
-error: This call to `unwrap()` will always panic.
+error: this call to `unwrap()` will always panic
--> $DIR/simple_conditionals.rs:61:9
|
LL | if x.is_err() {
LL | x.unwrap(); // will panic
| ^^^^^^^^^^
-error: You checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
+error: you checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`
--> $DIR/simple_conditionals.rs:62:9
|
LL | if x.is_err() {
LL | x.unwrap_err(); // unnecessary
| ^^^^^^^^^^^^^^
-error: You checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
+error: you checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`
--> $DIR/simple_conditionals.rs:64:9
|
LL | if x.is_err() {
LL | x.unwrap(); // unnecessary
| ^^^^^^^^^^
-error: This call to `unwrap_err()` will always panic.
+error: this call to `unwrap_err()` will always panic
--> $DIR/simple_conditionals.rs:65:9
|
LL | if x.is_err() {