rust/tests/ui/type/closure-with-wrong-borrows.rs

11 lines
181 B
Rust

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
}