]> git.lizzy.rs Git - rust.git/blob - src/test/ui/typeck/return_type_containing_closure.stderr
Auto merge of #91962 - matthiaskrgr:rollup-2g082jw, r=matthiaskrgr
[rust.git] / src / test / ui / typeck / return_type_containing_closure.stderr
1 error[E0308]: mismatched types
2   --> $DIR/return_type_containing_closure.rs:4:5
3    |
4 LL | fn foo() {
5    |          - possibly return type missing here?
6 LL |
7 LL |     vec!['a'].iter().map(|c| c)
8    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^- help: consider using a semicolon here: `;`
9    |     |
10    |     expected `()`, found struct `Map`
11    |
12    = note: expected unit type `()`
13                  found struct `Map<std::slice::Iter<'_, char>, [closure@$DIR/return_type_containing_closure.rs:4:26: 4:31]>`
14
15 error: aborting due to previous error
16
17 For more information about this error, try `rustc --explain E0308`.