summaryrefslogtreecommitdiffstats
path: root/tests/ui/typeck/return_type_containing_closure.rs
blob: 8b826daeede487c5da93fd4bc1e9e5f5d7c46f04 (plain)
1
2
3
4
5
6
7
8
9
10
#[allow(unused)]
fn foo() { //~ HELP a return type might be missing here
    vec!['a'].iter().map(|c| c)
    //~^ ERROR mismatched types [E0308]
    //~| NOTE expected `()`, found `Map<Iter<'_, char>, ...>`
    //~| NOTE expected unit type `()`
    //~| HELP consider using a semicolon here
}

fn main() {}