summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-21701.rs
blob: bfa03c5e42f8db30dfd6333ae1f5aa017708fb71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
fn foo<U>(t: U) {
    let y = t();
//~^ ERROR: expected function, found `U`
}

struct Bar;

pub fn some_func() {
    let f = Bar();
//~^ ERROR: expected function, found struct `Bar`
}

fn main() {
    foo(|| { 1 });
}