Skip to content

Commit d9ac655

Browse files
committed
Update stderr files
1 parent 548b43b commit d9ac655

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

tests/ui/map_flatten.stderr

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
11
error: called `map(..).flatten()` on an `Iterator`
2-
--> $DIR/map_flatten.rs:15:46
2+
--> $DIR/map_flatten.rs:16:46
33
|
44
LL | let _: Vec<_> = vec![5_i8; 6].into_iter().map(option_id).flatten().collect();
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try using `filter_map` instead: `.filter_map(option_id)`
66
|
77
= note: `-D clippy::map-flatten` implied by `-D warnings`
88

99
error: called `map(..).flatten()` on an `Iterator`
10-
--> $DIR/map_flatten.rs:16:46
10+
--> $DIR/map_flatten.rs:17:46
1111
|
1212
LL | let _: Vec<_> = vec![5_i8; 6].into_iter().map(option_id_ref).flatten().collect();
1313
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try using `filter_map` instead: `.filter_map(option_id_ref)`
1414

1515
error: called `map(..).flatten()` on an `Iterator`
16-
--> $DIR/map_flatten.rs:17:46
16+
--> $DIR/map_flatten.rs:18:46
1717
|
1818
LL | let _: Vec<_> = vec![5_i8; 6].into_iter().map(option_id_closure).flatten().collect();
1919
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try using `filter_map` instead: `.filter_map(option_id_closure)`
2020

2121
error: called `map(..).flatten()` on an `Iterator`
22-
--> $DIR/map_flatten.rs:18:46
22+
--> $DIR/map_flatten.rs:19:46
2323
|
2424
LL | let _: Vec<_> = vec![5_i8; 6].into_iter().map(|x| x.checked_add(1)).flatten().collect();
2525
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try using `filter_map` instead: `.filter_map(|x| x.checked_add(1))`
2626

2727
error: called `map(..).flatten()` on an `Iterator`
28-
--> $DIR/map_flatten.rs:21:46
28+
--> $DIR/map_flatten.rs:22:46
2929
|
3030
LL | let _: Vec<_> = vec![5_i8; 6].into_iter().map(|x| 0..x).flatten().collect();
3131
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try using `flat_map` instead: `.flat_map(|x| 0..x)`
3232

3333
error: called `map(..).flatten()` on an `Option`
34-
--> $DIR/map_flatten.rs:24:39
34+
--> $DIR/map_flatten.rs:25:39
3535
|
3636
LL | let _: Option<_> = (Some(Some(1))).map(|x| x).flatten();
3737
| ^^^^^^^^^^^^^^^^^^^^^ help: try using `and_then` instead: `.and_then(|x| x)`

tests/ui/option_option.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ LL | Struct { x: Option<Option<u8>> },
5959
| ^^^^^^^^^^^^^^^^^^
6060

6161
error: consider using `Option<T>` instead of `Option<Option<T>>` or a custom enum if you need to distinguish all 3 cases
62-
--> $DIR/option_option.rs:78:14
62+
--> $DIR/option_option.rs:76:14
6363
|
6464
LL | foo: Option<Option<Cow<'a, str>>>,
6565
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/ui/or_fun_call.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -79,25 +79,25 @@ LL | let _ = stringy.unwrap_or("".to_owned());
7979
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| "".to_owned())`
8080

8181
error: use of `unwrap_or` followed by a function call
82-
--> $DIR/or_fun_call.rs:76:21
82+
--> $DIR/or_fun_call.rs:77:21
8383
|
8484
LL | let _ = Some(1).unwrap_or(map[&1]);
8585
| ^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| map[&1])`
8686

8787
error: use of `unwrap_or` followed by a function call
88-
--> $DIR/or_fun_call.rs:78:21
88+
--> $DIR/or_fun_call.rs:79:21
8989
|
9090
LL | let _ = Some(1).unwrap_or(map[&1]);
9191
| ^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| map[&1])`
9292

9393
error: use of `or` followed by a function call
94-
--> $DIR/or_fun_call.rs:102:35
94+
--> $DIR/or_fun_call.rs:103:35
9595
|
9696
LL | let _ = Some("a".to_string()).or(Some("b".to_string()));
9797
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_else(|| Some("b".to_string()))`
9898

9999
error: use of `or` followed by a function call
100-
--> $DIR/or_fun_call.rs:106:10
100+
--> $DIR/or_fun_call.rs:107:10
101101
|
102102
LL | .or(Some(Bar(b, Duration::from_secs(2))));
103103
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_else(|| Some(Bar(b, Duration::from_secs(2))))`

tests/ui/try_err.stderr

+6-6
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ LL | Err(err)?;
2929
| ^^^^^^^^^ help: try this: `return Err(err.into())`
3030

3131
error: returning an `Err(_)` with the `?` operator
32-
--> $DIR/try_err.rs:86:23
32+
--> $DIR/try_err.rs:87:23
3333
|
3434
LL | Err(_) => Err(1)?,
3535
| ^^^^^^^ help: try this: `return Err(1)`
@@ -40,7 +40,7 @@ LL | try_validation!(Ok::<_, i32>(5));
4040
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
4141

4242
error: returning an `Err(_)` with the `?` operator
43-
--> $DIR/try_err.rs:101:23
43+
--> $DIR/try_err.rs:102:23
4444
|
4545
LL | Err(_) => Err(ret_one!())?,
4646
| ^^^^^^^^^^^^^^^^ help: try this: `return Err(ret_one!())`
@@ -51,25 +51,25 @@ LL | try_validation_in_macro!(Ok::<_, i32>(5));
5151
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
5252

5353
error: returning an `Err(_)` with the `?` operator
54-
--> $DIR/try_err.rs:140:9
54+
--> $DIR/try_err.rs:141:9
5555
|
5656
LL | Err(foo!())?;
5757
| ^^^^^^^^^^^^ help: try this: `return Err(foo!())`
5858

5959
error: returning an `Err(_)` with the `?` operator
60-
--> $DIR/try_err.rs:147:9
60+
--> $DIR/try_err.rs:148:9
6161
|
6262
LL | Err(io::ErrorKind::WriteZero)?
6363
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `return Poll::Ready(Err(io::ErrorKind::WriteZero.into()))`
6464

6565
error: returning an `Err(_)` with the `?` operator
66-
--> $DIR/try_err.rs:149:9
66+
--> $DIR/try_err.rs:150:9
6767
|
6868
LL | Err(io::Error::new(io::ErrorKind::InvalidInput, "error"))?
6969
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `return Poll::Ready(Err(io::Error::new(io::ErrorKind::InvalidInput, "error")))`
7070

7171
error: returning an `Err(_)` with the `?` operator
72-
--> $DIR/try_err.rs:157:9
72+
--> $DIR/try_err.rs:158:9
7373
|
7474
LL | Err(io::ErrorKind::NotFound)?
7575
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `return Poll::Ready(Some(Err(io::ErrorKind::NotFound.into())))`

0 commit comments

Comments
 (0)