rust/tests/ui/expr/malformed_closure/missing_block_in_fn_call.fixed

11 lines
231 B
Rust

//@ run-rustfix
fn main() {
let _ = vec![1, 2, 3].into_iter().map(|x| {
let y = x; //~ ERROR expected expression, found `let` statement
y
});
let _: () = foo(); //~ ERROR mismatched types
}
fn foo() {}