11error: usage of `Iterator::fold` on a type that implements `Try`
2- --> tests/ui/manual_try_fold.rs:59 :10
2+ --> tests/ui/manual_try_fold.rs:72 :10
33 |
44LL | .fold(Some(0i32), |sum, i| sum?.checked_add(*i))
55 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `try_fold` instead: `try_fold(0i32, |sum, i| ...)`
@@ -8,19 +8,19 @@ LL | .fold(Some(0i32), |sum, i| sum?.checked_add(*i))
88 = help: to override `-D warnings` add `#[allow(clippy::manual_try_fold)]`
99
1010error: usage of `Iterator::fold` on a type that implements `Try`
11- --> tests/ui/manual_try_fold.rs:64 :10
11+ --> tests/ui/manual_try_fold.rs:77 :10
1212 |
1313LL | .fold(NotOption(0i32, 0i32), |sum, i| NotOption(0i32, 0i32));
1414 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `try_fold` instead: `try_fold(..., |sum, i| ...)`
1515
1616error: usage of `Iterator::fold` on a type that implements `Try`
17- --> tests/ui/manual_try_fold.rs:68 :10
17+ --> tests/ui/manual_try_fold.rs:81 :10
1818 |
1919LL | .fold(NotOptionButWorse(0i32), |sum, i| NotOptionButWorse(0i32));
2020 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `try_fold` instead: `try_fold(0i32, |sum, i| ...)`
2121
2222error: usage of `Iterator::fold` on a type that implements `Try`
23- --> tests/ui/manual_try_fold.rs:99 :10
23+ --> tests/ui/manual_try_fold.rs:112 :10
2424 |
2525LL | .fold(Some(0i32), |sum, i| sum?.checked_add(*i))
2626 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `try_fold` instead: `try_fold(0i32, |sum, i| ...)`
0 commit comments