summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/redundant_pattern_matching_option.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/clippy/tests/ui/redundant_pattern_matching_option.stderr')
-rw-r--r--src/tools/clippy/tests/ui/redundant_pattern_matching_option.stderr64
1 files changed, 53 insertions, 11 deletions
diff --git a/src/tools/clippy/tests/ui/redundant_pattern_matching_option.stderr b/src/tools/clippy/tests/ui/redundant_pattern_matching_option.stderr
index 27ff812ba..a69eb3905 100644
--- a/src/tools/clippy/tests/ui/redundant_pattern_matching_option.stderr
+++ b/src/tools/clippy/tests/ui/redundant_pattern_matching_option.stderr
@@ -77,43 +77,49 @@ LL | let _ = if let Some(_) = opt { true } else { false };
| -------^^^^^^^------ help: try this: `if opt.is_some()`
error: redundant pattern matching, consider using `is_some()`
- --> $DIR/redundant_pattern_matching_option.rs:59:20
+ --> $DIR/redundant_pattern_matching_option.rs:60:20
|
LL | let _ = if let Some(_) = gen_opt() {
| -------^^^^^^^------------ help: try this: `if gen_opt().is_some()`
error: redundant pattern matching, consider using `is_none()`
- --> $DIR/redundant_pattern_matching_option.rs:61:19
+ --> $DIR/redundant_pattern_matching_option.rs:62:19
|
LL | } else if let None = gen_opt() {
| -------^^^^------------ help: try this: `if gen_opt().is_none()`
error: redundant pattern matching, consider using `is_some()`
- --> $DIR/redundant_pattern_matching_option.rs:80:12
+ --> $DIR/redundant_pattern_matching_option.rs:68:12
+ |
+LL | if let Some(..) = gen_opt() {}
+ | -------^^^^^^^^------------ help: try this: `if gen_opt().is_some()`
+
+error: redundant pattern matching, consider using `is_some()`
+ --> $DIR/redundant_pattern_matching_option.rs:83:12
|
LL | if let Some(_) = Some(42) {}
| -------^^^^^^^----------- help: try this: `if Some(42).is_some()`
error: redundant pattern matching, consider using `is_none()`
- --> $DIR/redundant_pattern_matching_option.rs:82:12
+ --> $DIR/redundant_pattern_matching_option.rs:85:12
|
LL | if let None = None::<()> {}
| -------^^^^------------- help: try this: `if None::<()>.is_none()`
error: redundant pattern matching, consider using `is_some()`
- --> $DIR/redundant_pattern_matching_option.rs:84:15
+ --> $DIR/redundant_pattern_matching_option.rs:87:15
|
LL | while let Some(_) = Some(42) {}
| ----------^^^^^^^----------- help: try this: `while Some(42).is_some()`
error: redundant pattern matching, consider using `is_none()`
- --> $DIR/redundant_pattern_matching_option.rs:86:15
+ --> $DIR/redundant_pattern_matching_option.rs:89:15
|
LL | while let None = None::<()> {}
| ----------^^^^------------- help: try this: `while None::<()>.is_none()`
error: redundant pattern matching, consider using `is_some()`
- --> $DIR/redundant_pattern_matching_option.rs:88:5
+ --> $DIR/redundant_pattern_matching_option.rs:91:5
|
LL | / match Some(42) {
LL | | Some(_) => true,
@@ -122,7 +128,7 @@ LL | | };
| |_____^ help: try this: `Some(42).is_some()`
error: redundant pattern matching, consider using `is_none()`
- --> $DIR/redundant_pattern_matching_option.rs:93:5
+ --> $DIR/redundant_pattern_matching_option.rs:96:5
|
LL | / match None::<()> {
LL | | Some(_) => false,
@@ -131,16 +137,52 @@ LL | | };
| |_____^ help: try this: `None::<()>.is_none()`
error: redundant pattern matching, consider using `is_none()`
- --> $DIR/redundant_pattern_matching_option.rs:101:12
+ --> $DIR/redundant_pattern_matching_option.rs:104:12
|
LL | if let None = *(&None::<()>) {}
| -------^^^^----------------- help: try this: `if (&None::<()>).is_none()`
error: redundant pattern matching, consider using `is_none()`
- --> $DIR/redundant_pattern_matching_option.rs:102:12
+ --> $DIR/redundant_pattern_matching_option.rs:105:12
|
LL | if let None = *&None::<()> {}
| -------^^^^--------------- help: try this: `if (&None::<()>).is_none()`
-error: aborting due to 21 previous errors
+error: redundant pattern matching, consider using `is_some()`
+ --> $DIR/redundant_pattern_matching_option.rs:111:5
+ |
+LL | / match x {
+LL | | Some(_) => true,
+LL | | _ => false,
+LL | | };
+ | |_____^ help: try this: `x.is_some()`
+
+error: redundant pattern matching, consider using `is_none()`
+ --> $DIR/redundant_pattern_matching_option.rs:116:5
+ |
+LL | / match x {
+LL | | None => true,
+LL | | _ => false,
+LL | | };
+ | |_____^ help: try this: `x.is_none()`
+
+error: redundant pattern matching, consider using `is_none()`
+ --> $DIR/redundant_pattern_matching_option.rs:121:5
+ |
+LL | / match x {
+LL | | Some(_) => false,
+LL | | _ => true,
+LL | | };
+ | |_____^ help: try this: `x.is_none()`
+
+error: redundant pattern matching, consider using `is_some()`
+ --> $DIR/redundant_pattern_matching_option.rs:126:5
+ |
+LL | / match x {
+LL | | None => false,
+LL | | _ => true,
+LL | | };
+ | |_____^ help: try this: `x.is_some()`
+
+error: aborting due to 26 previous errors