summaryrefslogtreecommitdiffstats
path: root/tests/ui/closures/multiple-fn-bounds.rs
blob: 6bb4098e2bbe5125fc967f298399bb6055e95d31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
fn foo<F: Fn(&char) -> bool + Fn(char) -> bool>(f: F) {
    //~^ NOTE required by a bound in `foo`
    //~| NOTE required by this bound in `foo`
    //~| NOTE closure inferred to have a different signature due to this bound
    todo!();
}

fn main() {
    let v = true;
    foo(move |x| v);
    //~^ ERROR type mismatch in closure arguments
    //~| NOTE expected closure signature
    //~| NOTE expected due to this
    //~| NOTE found signature defined here
}