]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/unnecessary_fold.stderr
Auto merge of #3603 - xfix:random-state-lint, r=phansch
[rust.git] / tests / ui / unnecessary_fold.stderr
index 8bc4b8244bd55b28ee29cf5e5b6b3468149f7684..2c2349bd3bc45325b0abf10fc7cc0b63957166ce 100644 (file)
@@ -1,33 +1,33 @@
 error: this `.fold` can be written more succinctly using another method
--> $DIR/unnecessary_fold.rs:4:19
-  |
-4 |     let _ = (0..3).fold(false, |acc, x| acc || x > 2);
-  |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.any(|x| x > 2)`
-  |
-  = note: `-D unnecessary-fold` implied by `-D warnings`
 --> $DIR/unnecessary_fold.rs:13:19
+   |
+LL |     let _ = (0..3).fold(false, |acc, x| acc || x > 2);
+   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.any(|x| x > 2)`
+   |
+   = note: `-D clippy::unnecessary-fold` implied by `-D warnings`
 
 error: this `.fold` can be written more succinctly using another method
--> $DIR/unnecessary_fold.rs:6:19
-  |
-6 |     let _ = (0..3).fold(true, |acc, x| acc && x > 2);
-  |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.all(|x| x > 2)`
 --> $DIR/unnecessary_fold.rs:15:19
+   |
+LL |     let _ = (0..3).fold(true, |acc, x| acc && x > 2);
+   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.all(|x| x > 2)`
 
 error: this `.fold` can be written more succinctly using another method
--> $DIR/unnecessary_fold.rs:8:19
-  |
-8 |     let _ = (0..3).fold(0, |acc, x| acc + x);
-  |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.sum()`
 --> $DIR/unnecessary_fold.rs:17:19
+   |
+LL |     let _ = (0..3).fold(0, |acc, x| acc + x);
+   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.sum()`
 
 error: this `.fold` can be written more succinctly using another method
-  --> $DIR/unnecessary_fold.rs:10:19
+  --> $DIR/unnecessary_fold.rs:19:19
    |
-10 |     let _ = (0..3).fold(1, |acc, x| acc * x);
+LL |     let _ = (0..3).fold(1, |acc, x| acc * x);
    |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.product()`
 
 error: this `.fold` can be written more succinctly using another method
-  --> $DIR/unnecessary_fold.rs:15:34
+  --> $DIR/unnecessary_fold.rs:24:34
    |
-15 |     let _ = (0..3).map(|x| 2 * x).fold(false, |acc, x| acc || x > 2);
+LL |     let _ = (0..3).map(|x| 2 * x).fold(false, |acc, x| acc || x > 2);
    |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.any(|x| x > 2)`
 
 error: aborting due to 5 previous errors