]> git.lizzy.rs Git - rust.git/blob - tests/ui/typeck/return_type_containing_closure.stderr
Rollup merge of #106323 - starkat99:stabilize-f16c_target_feature, r=petrochenkov
[rust.git] / tests / ui / typeck / return_type_containing_closure.stderr
1 error[E0308]: mismatched types
2   --> $DIR/return_type_containing_closure.rs:3:5
3    |
4 LL |     vec!['a'].iter().map(|c| c)
5    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found struct `Map`
6    |
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
10    |
11 LL |     vec!['a'].iter().map(|c| c);
12    |                                +
13 help: a return type might be missing here
14    |
15 LL | fn foo() -> _ {
16    |          ++++
17
18 error: aborting due to previous error
19
20 For more information about this error, try `rustc --explain E0308`.