11error: called `map(<f>).unwrap_or_default()` on an `Option` value
2-   --> tests/ui/manual_is_variant_and.rs:13 :17
2+   --> tests/ui/manual_is_variant_and.rs:51 :17
33   |
44LL |       let _ = opt.map(|x| x > 1)
55   |  _________________^
@@ -11,7 +11,7 @@ LL | |         .unwrap_or_default();
1111   = help: to override `-D warnings` add `#[allow(clippy::manual_is_variant_and)]`
1212
1313error: called `map(<f>).unwrap_or_default()` on an `Option` value
14-   --> tests/ui/manual_is_variant_and.rs:18 :17
14+   --> tests/ui/manual_is_variant_and.rs:56 :17
1515   |
1616LL |       let _ = opt.map(|x| {
1717   |  _________________^
@@ -30,28 +30,52 @@ LL ~     });
3030   |
3131
3232error: called `map(<f>).unwrap_or_default()` on an `Option` value
33-   --> tests/ui/manual_is_variant_and.rs:23 :17
33+   --> tests/ui/manual_is_variant_and.rs:61 :17
3434   |
3535LL |     let _ = opt.map(|x| x > 1).unwrap_or_default();
3636   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `is_some_and(|x| x > 1)`
3737
3838error: called `map(<f>).unwrap_or_default()` on an `Option` value
39-   --> tests/ui/manual_is_variant_and.rs:26 :10
39+   --> tests/ui/manual_is_variant_and.rs:64 :10
4040   |
4141LL |           .map(|x| x > 1)
4242   |  __________^
4343LL | |
4444LL | |         .unwrap_or_default();
4545   | |____________________________^ help: use: `is_some_and(|x| x > 1)`
4646
47+ error: called `.map() == Some()`
48+   --> tests/ui/manual_is_variant_and.rs:68:13
49+    |
50+ LL |     let _ = Some(2).map(|x| x % 2 == 0) == Some(true);
51+    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `Some(2).is_some_and(|x| x % 2 == 0)`
52+ 
53+ error: called `.map() != Some()`
54+   --> tests/ui/manual_is_variant_and.rs:70:13
55+    |
56+ LL |     let _ = Some(2).map(|x| x % 2 == 0) != Some(true);
57+    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `Some(2).is_none_or(|x| x % 2 == 0)`
58+ 
59+ error: called `.map() == Some()`
60+   --> tests/ui/manual_is_variant_and.rs:72:13
61+    |
62+ LL |     let _ = Some(2).map(|x| x % 2 == 0) == some_true!();
63+    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `Some(2).is_some_and(|x| x % 2 == 0)`
64+ 
65+ error: called `.map() != Some()`
66+   --> tests/ui/manual_is_variant_and.rs:74:13
67+    |
68+ LL |     let _ = Some(2).map(|x| x % 2 == 0) != some_false!();
69+    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `Some(2).is_none_or(|x| x % 2 == 0)`
70+ 
4771error: called `map(<f>).unwrap_or_default()` on an `Option` value
48-   --> tests/ui/manual_is_variant_and.rs:34 :18
72+   --> tests/ui/manual_is_variant_and.rs:81 :18
4973   |
5074LL |     let _ = opt2.map(char::is_alphanumeric).unwrap_or_default(); // should lint
5175   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `is_some_and(char::is_alphanumeric)`
5276
5377error: called `map(<f>).unwrap_or_default()` on a `Result` value
54-   --> tests/ui/manual_is_variant_and.rs:44 :17
78+   --> tests/ui/manual_is_variant_and.rs:99 :17
5579   |
5680LL |       let _ = res.map(|x| {
5781   |  _________________^
@@ -70,19 +94,37 @@ LL ~     });
7094   |
7195
7296error: called `map(<f>).unwrap_or_default()` on a `Result` value
73-   --> tests/ui/manual_is_variant_and.rs:49 :17
97+   --> tests/ui/manual_is_variant_and.rs:104 :17
7498   |
7599LL |       let _ = res.map(|x| x > 1)
76100   |  _________________^
77101LL | |
78102LL | |         .unwrap_or_default();
79103   | |____________________________^ help: use: `is_ok_and(|x| x > 1)`
80104
105+ error: called `.map() == Ok()`
106+   --> tests/ui/manual_is_variant_and.rs:108:13
107+    |
108+ LL |     let _ = Ok::<usize, ()>(2).map(|x| x % 2 == 0) == Ok(true);
109+    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `Ok::<usize, ()>(2).is_ok_and(|x| x % 2 == 0)`
110+ 
111+ error: called `.map() != Ok()`
112+   --> tests/ui/manual_is_variant_and.rs:110:13
113+    |
114+ LL |     let _ = Ok::<usize, ()>(2).map(|x| x % 2 == 0) != Ok(true);
115+    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!Ok::<usize, ()>(2).is_ok_and(|x| x % 2 == 0)`
116+ 
117+ error: called `.map() != Ok()`
118+   --> tests/ui/manual_is_variant_and.rs:112:13
119+    |
120+ LL |     let _ = Ok::<usize, ()>(2).map(|x| x % 2 == 0) != Ok(true);
121+    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!Ok::<usize, ()>(2).is_ok_and(|x| x % 2 == 0)`
122+ 
81123error: called `map(<f>).unwrap_or_default()` on a `Result` value
82-   --> tests/ui/manual_is_variant_and.rs:57 :18
124+   --> tests/ui/manual_is_variant_and.rs:119 :18
83125   |
84126LL |     let _ = res2.map(char::is_alphanumeric).unwrap_or_default(); // should lint
85127   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `is_ok_and(char::is_alphanumeric)`
86128
87- error: aborting due to 8  previous errors
129+ error: aborting due to 15  previous errors
88130
0 commit comments