summaryrefslogtreecommitdiffstats
path: root/src/test/ui/type/type-check/unknown_type_for_closure.rs
blob: 167687c18712910fbac5c86b1ef9636d05f5ef57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
fn infer_in_arg() {
    let x = |b: Vec<_>| {}; //~ ERROR E0282
}

fn empty_pattern() {
    let x = |_| {}; //~ ERROR type annotations needed
}

fn infer_ty() {
    let x = |k: _| {}; //~ ERROR type annotations needed
}

fn ambig_return() {
    let x = || -> Vec<_> { Vec::new() }; //~ ERROR type annotations needed
}

fn main() {}