]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/issues/issue-3044.stderr
Auto merge of #94799 - lcnr:list-ty-perf, r=petrochenkov
[rust.git] / src / test / ui / issues / issue-3044.stderr
index b93aeade95e42d37e1fba71104252081c6e74724..5bb07cfda214286eeb8b8d99877166f84d26c09d 100644 (file)
@@ -1,19 +1,34 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-3044.rs:3:35
+   |
+LL |       needlesArr.iter().fold(|x, y| {
+   |  ___________________________________^
+LL | |     });
+   | |_____^ expected closure, found `()`
+   |
+   = note: expected closure `[closure@$DIR/issue-3044.rs:3:28: 4:6]`
+            found unit type `()`
+
 error[E0061]: this function takes 2 arguments but 1 argument was supplied
   --> $DIR/issue-3044.rs:3:23
    |
 LL |       needlesArr.iter().fold(|x, y| {
-   |  _______________________^^^^_-
-   | |                       |
-   | |                       expected 2 arguments
+   |  _______________________^^^^-
 LL | |     });
-   | |_____- supplied 1 argument
+   | |______- an argument is missing
    |
 note: associated function defined here
   --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
    |
 LL |     fn fold<B, F>(mut self, init: B, mut f: F) -> B
    |        ^^^^
+help: provide the argument
+   |
+LL ~     needlesArr.iter().fold(|x, y| {
+LL ~     }, {_});
+   |
 
-error: aborting due to previous error
+error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0061`.
+Some errors have detailed explanations: E0061, E0308.
+For more information about an error, try `rustc --explain E0061`.