]> git.lizzy.rs Git - rust.git/blob - tests/ui/map_collect_result_unit.stderr
Move MSRV tests into the lint specific test files
[rust.git] / tests / ui / map_collect_result_unit.stderr
1 error: `.map().collect()` can be replaced with `.try_for_each()`
2   --> $DIR/map_collect_result_unit.rs:6:17
3    |
4 LL |         let _ = (0..3).map(|t| Err(t + 1)).collect::<Result<(), _>>();
5    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `(0..3).try_for_each(|t| Err(t + 1))`
6    |
7    = note: `-D clippy::map-collect-result-unit` implied by `-D warnings`
8
9 error: `.map().collect()` can be replaced with `.try_for_each()`
10   --> $DIR/map_collect_result_unit.rs:7:32
11    |
12 LL |         let _: Result<(), _> = (0..3).map(|t| Err(t + 1)).collect();
13    |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `(0..3).try_for_each(|t| Err(t + 1))`
14
15 error: aborting due to 2 previous errors
16