1 error[E0308]: mismatched types
2 --> $DIR/return_type_containing_closure.rs:3:5
4 LL | vec!['a'].iter().map(|c| c)
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found struct `Map`
7 = note: expected unit type `()`
8 found struct `Map<std::slice::Iter<'_, char>, [closure@$DIR/return_type_containing_closure.rs:3:26: 3:29]>`
9 help: consider using a semicolon here
11 LL | vec!['a'].iter().map(|c| c);
13 help: a return type might be missing here
18 error: aborting due to previous error
20 For more information about this error, try `rustc --explain E0308`.