Skip to content

Commit 4366137

Browse files
committed
Update tests
1 parent 08f658b commit 4366137

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

tests/ui/unnecessary_fold.stderr

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
error: this `.fold` can be written more succinctly using another method
2-
--> $DIR/unnecessary_fold.rs:8:19
2+
--> $DIR/unnecessary_fold.rs:8:20
33
|
44
LL | let _ = (0..3).fold(false, |acc, x| acc || x > 2);
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.any(|x| x > 2)`
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `any(|x| x > 2)`
66
|
77
= note: `-D clippy::unnecessary-fold` implied by `-D warnings`
88

99
error: this `.fold` can be written more succinctly using another method
10-
--> $DIR/unnecessary_fold.rs:10:19
10+
--> $DIR/unnecessary_fold.rs:10:20
1111
|
1212
LL | let _ = (0..3).fold(true, |acc, x| acc && x > 2);
13-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.all(|x| x > 2)`
13+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `all(|x| x > 2)`
1414

1515
error: this `.fold` can be written more succinctly using another method
16-
--> $DIR/unnecessary_fold.rs:12:24
16+
--> $DIR/unnecessary_fold.rs:12:25
1717
|
1818
LL | let _: i32 = (0..3).fold(0, |acc, x| acc + x);
19-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.sum()`
19+
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum()`
2020

2121
error: this `.fold` can be written more succinctly using another method
22-
--> $DIR/unnecessary_fold.rs:14:24
22+
--> $DIR/unnecessary_fold.rs:14:25
2323
|
2424
LL | let _: i32 = (0..3).fold(1, |acc, x| acc * x);
25-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.product()`
25+
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `product()`
2626

2727
error: this `.fold` can be written more succinctly using another method
28-
--> $DIR/unnecessary_fold.rs:19:40
28+
--> $DIR/unnecessary_fold.rs:19:41
2929
|
3030
LL | let _: bool = (0..3).map(|x| 2 * x).fold(false, |acc, x| acc || x > 2);
31-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.any(|x| x > 2)`
31+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `any(|x| x > 2)`
3232

3333
error: this `.fold` can be written more succinctly using another method
3434
--> $DIR/unnecessary_fold.rs:49:10

0 commit comments

Comments
 (0)