1 error: this `.fold` can be written more succinctly using another method
2 --> $DIR/unnecessary_fold.rs:4:19
4 4 | let _ = (0..3).fold(false, |acc, x| acc || x > 2);
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.any(|x| x > 2)`
7 = note: `-D clippy::unnecessary-fold` implied by `-D warnings`
9 error: this `.fold` can be written more succinctly using another method
10 --> $DIR/unnecessary_fold.rs:6:19
12 6 | let _ = (0..3).fold(true, |acc, x| acc && x > 2);
13 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.all(|x| x > 2)`
15 error: this `.fold` can be written more succinctly using another method
16 --> $DIR/unnecessary_fold.rs:8:19
18 8 | let _ = (0..3).fold(0, |acc, x| acc + x);
19 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.sum()`
21 error: this `.fold` can be written more succinctly using another method
22 --> $DIR/unnecessary_fold.rs:10:19
24 10 | let _ = (0..3).fold(1, |acc, x| acc * x);
25 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.product()`
27 error: this `.fold` can be written more succinctly using another method
28 --> $DIR/unnecessary_fold.rs:15:34
30 15 | let _ = (0..3).map(|x| 2 * x).fold(false, |acc, x| acc || x > 2);
31 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.any(|x| x > 2)`
33 error: aborting due to 5 previous errors