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| { | _______________________^^^^- LL | | }); | |______- an argument is missing | note: associated function defined here --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL | LL | fn fold(mut self, init: B, mut f: F) -> B | ^^^^ help: provide the argument | LL ~ needlesArr.iter().fold(|x, y| { LL ~ }, /* value */); | error: aborting due to 2 previous errors Some errors have detailed explanations: E0061, E0308. For more information about an error, try `rustc --explain E0061`.