2023-07-02 12:35:19 +00:00
|
|
|
error: usage of `Iterator::fold` on a type that implements `Try`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/manual_try_fold.rs:59:10
|
2023-07-02 12:35:19 +00:00
|
|
|
|
|
|
|
|
LL | .fold(Some(0i32), |sum, i| sum?.checked_add(*i))
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `try_fold` instead: `try_fold(0i32, |sum, i| ...)`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::manual-try-fold` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::manual_try_fold)]`
|
2023-07-02 12:35:19 +00:00
|
|
|
|
|
|
|
error: usage of `Iterator::fold` on a type that implements `Try`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/manual_try_fold.rs:63:10
|
2023-07-02 12:35:19 +00:00
|
|
|
|
|
|
|
|
LL | .fold(NotOption(0i32, 0i32), |sum, i| NotOption(0i32, 0i32));
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `try_fold` instead: `try_fold(..., |sum, i| ...)`
|
|
|
|
|
|
|
|
error: usage of `Iterator::fold` on a type that implements `Try`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/manual_try_fold.rs:66:10
|
2023-07-02 12:35:19 +00:00
|
|
|
|
|
|
|
|
LL | .fold(NotOptionButWorse(0i32), |sum, i| NotOptionButWorse(0i32));
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `try_fold` instead: `try_fold(0i32, |sum, i| ...)`
|
|
|
|
|
|
|
|
error: usage of `Iterator::fold` on a type that implements `Try`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/manual_try_fold.rs:96:10
|
2023-07-02 12:35:19 +00:00
|
|
|
|
|
|
|
|
LL | .fold(Some(0i32), |sum, i| sum?.checked_add(*i))
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `try_fold` instead: `try_fold(0i32, |sum, i| ...)`
|
|
|
|
|
|
|
|
error: aborting due to 4 previous errors
|
|
|
|
|