1
- error: use the question mark operator instead of an `and_then` call
1
+ error: use the `?` operator instead of an `and_then` call
2
2
--> tests/ui/return_and_then.rs:5:9
3
3
|
4
4
LL | / opt.and_then(|n| {
@@ -20,7 +20,7 @@ LL + ret += n;
20
20
LL + if n > 1 { Some(ret) } else { None }
21
21
|
22
22
23
- error: use the question mark operator instead of an `and_then` call
23
+ error: use the `?` operator instead of an `and_then` call
24
24
--> tests/ui/return_and_then.rs:14:9
25
25
|
26
26
LL | opt.and_then(|n| test_opt_block(Some(n)))
@@ -32,7 +32,7 @@ LL ~ let n = opt?;
32
32
LL + test_opt_block(Some(n))
33
33
|
34
34
35
- error: use the question mark operator instead of an `and_then` call
35
+ error: use the `?` operator instead of an `and_then` call
36
36
--> tests/ui/return_and_then.rs:19:9
37
37
|
38
38
LL | gen_option(1).and_then(|n| test_opt_block(Some(n)))
@@ -44,7 +44,7 @@ LL ~ let n = gen_option(1)?;
44
44
LL + test_opt_block(Some(n))
45
45
|
46
46
47
- error: use the question mark operator instead of an `and_then` call
47
+ error: use the `?` operator instead of an `and_then` call
48
48
--> tests/ui/return_and_then.rs:24:9
49
49
|
50
50
LL | opt.and_then(|n| if n > 1 { Ok(n + 1) } else { Err(n) })
@@ -56,7 +56,7 @@ LL ~ let n = opt?;
56
56
LL + if n > 1 { Ok(n + 1) } else { Err(n) }
57
57
|
58
58
59
- error: use the question mark operator instead of an `and_then` call
59
+ error: use the `?` operator instead of an `and_then` call
60
60
--> tests/ui/return_and_then.rs:29:9
61
61
|
62
62
LL | opt.and_then(|n| test_res_block(Ok(n)))
@@ -68,7 +68,7 @@ LL ~ let n = opt?;
68
68
LL + test_res_block(Ok(n))
69
69
|
70
70
71
- error: use the question mark operator instead of an `and_then` call
71
+ error: use the `?` operator instead of an `and_then` call
72
72
--> tests/ui/return_and_then.rs:35:9
73
73
|
74
74
LL | Some("").and_then(|x| if x.len() > 2 { Some(3) } else { None })
@@ -80,7 +80,7 @@ LL ~ let x = Some("")?;
80
80
LL + if x.len() > 2 { Some(3) } else { None }
81
81
|
82
82
83
- error: use the question mark operator instead of an `and_then` call
83
+ error: use the `?` operator instead of an `and_then` call
84
84
--> tests/ui/return_and_then.rs:41:9
85
85
|
86
86
LL | / Some(match (vec![1, 2, 3], vec![1, 2, 4]) {
0 commit comments