rust/src/test/ui/issues/issue-40000.rs
2018-12-25 21:08:33 -07:00

9 lines
244 B
Rust

fn main() {
let bar: fn(&mut u32) = |_| {};
fn foo(x: Box<Fn(&i32)>) {}
let bar = Box::new(|x: &i32| {}) as Box<Fn(_)>;
foo(bar); //~ ERROR mismatched types
//~| expected concrete lifetime, found bound lifetime parameter
}