]> git.lizzy.rs Git - rust.git/blob - tests/ui/option_filter_map.stderr
Auto merge of #7002 - mgacek8:issue6983_wrong_self_convention_inside_trait_impls...
[rust.git] / tests / ui / option_filter_map.stderr
1 error: `filter` for `Some` followed by `unwrap`
2   --> $DIR/option_filter_map.rs:8:27
3    |
4 LL |     let _ = Some(Some(1)).filter(Option::is_some).map(Option::unwrap);
5    |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `flatten` instead: `flatten()`
6    |
7    = note: `-D clippy::option-filter-map` implied by `-D warnings`
8
9 error: `filter` for `Some` followed by `unwrap`
10   --> $DIR/option_filter_map.rs:9:27
11    |
12 LL |     let _ = Some(Some(1)).filter(|o| o.is_some()).map(|o| o.unwrap());
13    |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `flatten` instead: `flatten()`
14
15 error: `filter` for `Some` followed by `unwrap`
16   --> $DIR/option_filter_map.rs:10:35
17    |
18 LL |     let _ = Some(1).map(odds_out).filter(Option::is_some).map(Option::unwrap);
19    |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `flatten` instead: `flatten()`
20
21 error: `filter` for `Some` followed by `unwrap`
22   --> $DIR/option_filter_map.rs:11:35
23    |
24 LL |     let _ = Some(1).map(odds_out).filter(|o| o.is_some()).map(|o| o.unwrap());
25    |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `flatten` instead: `flatten()`
26
27 error: `filter` for `Some` followed by `unwrap`
28   --> $DIR/option_filter_map.rs:13:39
29    |
30 LL |     let _ = vec![Some(1)].into_iter().filter(Option::is_some).map(Option::unwrap);
31    |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `flatten` instead: `flatten()`
32
33 error: `filter` for `Some` followed by `unwrap`
34   --> $DIR/option_filter_map.rs:14:39
35    |
36 LL |     let _ = vec![Some(1)].into_iter().filter(|o| o.is_some()).map(|o| o.unwrap());
37    |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `flatten` instead: `flatten()`
38
39 error: `filter` for `Some` followed by `unwrap`
40   --> $DIR/option_filter_map.rs:18:10
41    |
42 LL |           .filter(Option::is_some)
43    |  __________^
44 LL | |         .map(Option::unwrap);
45    | |____________________________^ help: consider using `flatten` instead: `flatten()`
46
47 error: `filter` for `Some` followed by `unwrap`
48   --> $DIR/option_filter_map.rs:23:10
49    |
50 LL |           .filter(|o| o.is_some())
51    |  __________^
52 LL | |         .map(|o| o.unwrap());
53    | |____________________________^ help: consider using `flatten` instead: `flatten()`
54
55 error: aborting due to 8 previous errors
56