11error: use the `?` operator instead of an `and_then` call
2- --> tests/ui/return_and_then.rs:5 :9
2+ --> tests/ui/return_and_then.rs:6 :9
33 |
44LL | / opt.and_then(|n| {
55LL | |
@@ -21,7 +21,7 @@ LL + if n > 1 { Some(ret) } else { None }
2121 |
2222
2323error: use the `?` operator instead of an `and_then` call
24- --> tests/ui/return_and_then.rs:14 :9
24+ --> tests/ui/return_and_then.rs:15 :9
2525 |
2626LL | opt.and_then(|n| test_opt_block(Some(n)))
2727 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -33,7 +33,7 @@ LL + test_opt_block(Some(n))
3333 |
3434
3535error: use the `?` operator instead of an `and_then` call
36- --> tests/ui/return_and_then.rs:19 :9
36+ --> tests/ui/return_and_then.rs:20 :9
3737 |
3838LL | gen_option(1).and_then(|n| test_opt_block(Some(n)))
3939 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -45,7 +45,7 @@ LL + test_opt_block(Some(n))
4545 |
4646
4747error: use the `?` operator instead of an `and_then` call
48- --> tests/ui/return_and_then.rs:24 :9
48+ --> tests/ui/return_and_then.rs:25 :9
4949 |
5050LL | opt.and_then(|n| if n > 1 { Ok(n + 1) } else { Err(n) })
5151 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -57,7 +57,7 @@ LL + if n > 1 { Ok(n + 1) } else { Err(n) }
5757 |
5858
5959error: use the `?` operator instead of an `and_then` call
60- --> tests/ui/return_and_then.rs:29 :9
60+ --> tests/ui/return_and_then.rs:30 :9
6161 |
6262LL | opt.and_then(|n| test_res_block(Ok(n)))
6363 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -69,7 +69,7 @@ LL + test_res_block(Ok(n))
6969 |
7070
7171error: use the `?` operator instead of an `and_then` call
72- --> tests/ui/return_and_then.rs:35 :9
72+ --> tests/ui/return_and_then.rs:36 :9
7373 |
7474LL | Some("").and_then(|x| if x.len() > 2 { Some(3) } else { None })
7575 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -81,7 +81,7 @@ LL + if x.len() > 2 { Some(3) } else { None }
8181 |
8282
8383error: use the `?` operator instead of an `and_then` call
84- --> tests/ui/return_and_then.rs:41 :9
84+ --> tests/ui/return_and_then.rs:42 :9
8585 |
8686LL | / Some(match (vec![1, 2, 3], vec![1, 2, 4]) {
8787LL | |
@@ -102,7 +102,7 @@ LL + if x.len() > 2 { Some(3) } else { None }
102102 |
103103
104104error: use the `?` operator instead of an `and_then` call
105- --> tests/ui/return_and_then.rs:69 :13
105+ --> tests/ui/return_and_then.rs:70 :13
106106 |
107107LL | Some("").and_then(|x| if x.len() > 2 { Some(3) } else { None })
108108 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -114,7 +114,7 @@ LL + if x.len() > 2 { Some(3) } else { None }
114114 |
115115
116116error: use the `?` operator instead of an `and_then` call
117- --> tests/ui/return_and_then.rs:77 :20
117+ --> tests/ui/return_and_then.rs:78 :20
118118 |
119119LL | return Some("").and_then(|x| if x.len() > 2 { Some(3) } else { None });
120120 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -128,7 +128,7 @@ LL ~ };
128128 |
129129
130130error: use the `?` operator instead of an `and_then` call
131- --> tests/ui/return_and_then.rs:85 :20
131+ --> tests/ui/return_and_then.rs:86 :20
132132 |
133133LL | return Some("").and_then(|mut x| {
134134 | ____________________^
0 commit comments