]> git.lizzy.rs Git - rust.git/blob - tests/ui/typeck/return_type_containing_closure.rs
Auto merge of #107663 - matthiaskrgr:107423-point-at-EOF-code, r=compiler-errors
[rust.git] / tests / ui / typeck / return_type_containing_closure.rs
1 #[allow(unused)]
2 fn foo() { //~ HELP a return type might be missing here
3     vec!['a'].iter().map(|c| c)
4     //~^ ERROR mismatched types [E0308]
5     //~| NOTE expected `()`, found `Map<Iter<'_, char>, ...>`
6     //~| NOTE expected unit type `()`
7     //~| HELP consider using a semicolon here
8 }
9
10 fn main() {}