fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error: usage of `Iterator::fold` on a type that implements `Try` 2 --> $DIR/manual_try_fold.rs:59:10 3 | 4LL | .fold(Some(0i32), |sum, i| sum?.checked_add(*i)) 5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `try_fold` instead: `try_fold(0i32, |sum, i| ...)` 6 | 7 = note: `-D clippy::manual-try-fold` implied by `-D warnings` 8 = help: to override `-D warnings` add `#[allow(clippy::manual_try_fold)]` 9 10error: usage of `Iterator::fold` on a type that implements `Try` 11 --> $DIR/manual_try_fold.rs:63:10 12 | 13LL | .fold(NotOption(0i32, 0i32), |sum, i| NotOption(0i32, 0i32)); 14 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `try_fold` instead: `try_fold(..., |sum, i| ...)` 15 16error: usage of `Iterator::fold` on a type that implements `Try` 17 --> $DIR/manual_try_fold.rs:66:10 18 | 19LL | .fold(NotOptionButWorse(0i32), |sum, i| NotOptionButWorse(0i32)); 20 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `try_fold` instead: `try_fold(0i32, |sum, i| ...)` 21 22error: usage of `Iterator::fold` on a type that implements `Try` 23 --> $DIR/manual_try_fold.rs:96:10 24 | 25LL | .fold(Some(0i32), |sum, i| sum?.checked_add(*i)) 26 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `try_fold` instead: `try_fold(0i32, |sum, i| ...)` 27 28error: aborting due to 4 previous errors 29