1- error:
1+ error: using `map` over `inspect`
22 --> tests/ui/manual_inspect.rs:5:21
33 |
44LL | let _ = Some(0).map(|x| {
@@ -12,7 +12,7 @@ LL ~ let _ = Some(0).inspect(|&x| {
1212LL ~ println!("{}", x);
1313 |
1414
15- error:
15+ error: using `map` over `inspect`
1616 --> tests/ui/manual_inspect.rs:10:21
1717 |
1818LL | let _ = Some(0).map(|x| {
@@ -24,7 +24,7 @@ LL ~ let _ = Some(0).inspect(|&x| {
2424LL ~ println!("{x}");
2525 |
2626
27- error:
27+ error: using `map` over `inspect`
2828 --> tests/ui/manual_inspect.rs:15:21
2929 |
3030LL | let _ = Some(0).map(|x| {
@@ -36,7 +36,7 @@ LL ~ let _ = Some(0).inspect(|&x| {
3636LL ~ println!("{}", x * 5 + 1);
3737 |
3838
39- error:
39+ error: using `map` over `inspect`
4040 --> tests/ui/manual_inspect.rs:20:21
4141 |
4242LL | let _ = Some(0).map(|x| {
@@ -50,7 +50,7 @@ LL | panic!();
5050LL ~ }
5151 |
5252
53- error:
53+ error: using `map` over `inspect`
5454 --> tests/ui/manual_inspect.rs:27:21
5555 |
5656LL | let _ = Some(0).map(|x| {
@@ -65,7 +65,7 @@ LL | panic!();
6565LL ~ }
6666 |
6767
68- error:
68+ error: using `map` over `inspect`
6969 --> tests/ui/manual_inspect.rs:78:41
7070 |
7171LL | let _ = Some((String::new(), 0u32)).map(|x| {
@@ -80,7 +80,7 @@ LL | panic!();
8080LL ~ }
8181 |
8282
83- error:
83+ error: using `map` over `inspect`
8484 --> tests/ui/manual_inspect.rs:104:33
8585 |
8686LL | let _ = Some(String::new()).map(|x| {
9898LL ~ println!("test");
9999 |
100100
101- error:
101+ error: using `map` over `inspect`
102102 --> tests/ui/manual_inspect.rs:115:21
103103 |
104104LL | let _ = Some(0).map(|x| {
@@ -113,7 +113,7 @@ LL | panic!();
113113LL ~ }
114114 |
115115
116- error:
116+ error: using `map` over `inspect`
117117 --> tests/ui/manual_inspect.rs:130:46
118118 |
119119LL | let _ = Some(Cell2(Cell::new(0u32))).map(|x| {
@@ -125,7 +125,7 @@ LL ~ let _ = Some(Cell2(Cell::new(0u32))).inspect(|x| {
125125LL ~ x.0.set(1);
126126 |
127127
128- error:
128+ error: using `map` over `inspect`
129129 --> tests/ui/manual_inspect.rs:146:34
130130 |
131131LL | let _: Result<_, ()> = Ok(0).map(|x| {
@@ -137,7 +137,7 @@ LL ~ let _: Result<_, ()> = Ok(0).inspect(|&x| {
137137LL ~ println!("{}", x);
138138 |
139139
140- error:
140+ error: using `map_err` over `inspect_err`
141141 --> tests/ui/manual_inspect.rs:151:35
142142 |
143143LL | let _: Result<(), _> = Err(0).map_err(|x| {
@@ -166,7 +166,7 @@ LL | | .count();
166166 = note: `-D clippy::suspicious-map` implied by `-D warnings`
167167 = help: to override `-D warnings` add `#[allow(clippy::suspicious_map)]`
168168
169- error:
169+ error: using `map` over `inspect`
170170 --> tests/ui/manual_inspect.rs:158:10
171171 |
172172LL | .map(|x| {
0 commit comments