]> git.lizzy.rs Git - rust.git/blob - tests/ui/redundant_pattern_matching.stderr
Auto merge of #3635 - matthiaskrgr:revert_random_state_3603, r=xfix
[rust.git] / tests / ui / redundant_pattern_matching.stderr
1 error: redundant pattern matching, consider using `is_ok()`
2   --> $DIR/redundant_pattern_matching.rs:14:12
3    |
4 LL |     if let Ok(_) = Ok::<i32, i32>(42) {}
5    |     -------^^^^^------------------------ help: try this: `if Ok::<i32, i32>(42).is_ok()`
6    |
7    = note: `-D clippy::redundant-pattern-matching` implied by `-D warnings`
8
9 error: redundant pattern matching, consider using `is_err()`
10   --> $DIR/redundant_pattern_matching.rs:16:12
11    |
12 LL |     if let Err(_) = Err::<i32, i32>(42) {}
13    |     -------^^^^^^------------------------- help: try this: `if Err::<i32, i32>(42).is_err()`
14
15 error: redundant pattern matching, consider using `is_none()`
16   --> $DIR/redundant_pattern_matching.rs:18:12
17    |
18 LL |     if let None = None::<()> {}
19    |     -------^^^^---------------- help: try this: `if None::<()>.is_none()`
20
21 error: redundant pattern matching, consider using `is_some()`
22   --> $DIR/redundant_pattern_matching.rs:20:12
23    |
24 LL |     if let Some(_) = Some(42) {}
25    |     -------^^^^^^^-------------- help: try this: `if Some(42).is_some()`
26
27 error: redundant pattern matching, consider using `is_ok()`
28   --> $DIR/redundant_pattern_matching.rs:34:5
29    |
30 LL | /     match Ok::<i32, i32>(42) {
31 LL | |         Ok(_) => true,
32 LL | |         Err(_) => false,
33 LL | |     };
34    | |_____^ help: try this: `Ok::<i32, i32>(42).is_ok()`
35
36 error: redundant pattern matching, consider using `is_err()`
37   --> $DIR/redundant_pattern_matching.rs:39:5
38    |
39 LL | /     match Ok::<i32, i32>(42) {
40 LL | |         Ok(_) => false,
41 LL | |         Err(_) => true,
42 LL | |     };
43    | |_____^ help: try this: `Ok::<i32, i32>(42).is_err()`
44
45 error: redundant pattern matching, consider using `is_err()`
46   --> $DIR/redundant_pattern_matching.rs:44:5
47    |
48 LL | /     match Err::<i32, i32>(42) {
49 LL | |         Ok(_) => false,
50 LL | |         Err(_) => true,
51 LL | |     };
52    | |_____^ help: try this: `Err::<i32, i32>(42).is_err()`
53
54 error: redundant pattern matching, consider using `is_ok()`
55   --> $DIR/redundant_pattern_matching.rs:49:5
56    |
57 LL | /     match Err::<i32, i32>(42) {
58 LL | |         Ok(_) => true,
59 LL | |         Err(_) => false,
60 LL | |     };
61    | |_____^ help: try this: `Err::<i32, i32>(42).is_ok()`
62
63 error: redundant pattern matching, consider using `is_some()`
64   --> $DIR/redundant_pattern_matching.rs:54:5
65    |
66 LL | /     match Some(42) {
67 LL | |         Some(_) => true,
68 LL | |         None => false,
69 LL | |     };
70    | |_____^ help: try this: `Some(42).is_some()`
71
72 error: redundant pattern matching, consider using `is_none()`
73   --> $DIR/redundant_pattern_matching.rs:59:5
74    |
75 LL | /     match None::<()> {
76 LL | |         Some(_) => false,
77 LL | |         None => true,
78 LL | |     };
79    | |_____^ help: try this: `None::<()>.is_none()`
80
81 error: aborting due to 10 previous errors
82