summaryrefslogtreecommitdiffstats
path: root/tests/ui/type/closure-with-wrong-borrows.rs
blob: 5f6a78351a2477fc75d5022fc0364b61e46d6ce2 (plain)
1
2
3
4
5
6
7
8
9
10
struct S<'a>(&'a str);

fn f(inner: fn(&str, &S)) {
}

#[allow(unreachable_code)]
fn main() {
    let inner: fn(_, _) = unimplemented!();
    f(inner); //~ ERROR mismatched types
}