2017-03-26 14:15:47 +03:00
|
|
|
fn main() {
|
2017-05-08 16:17:26 -05:00
|
|
|
let bar: fn(&mut u32) = |_| {};
|
2017-03-26 14:15:47 +03:00
|
|
|
|
|
|
|
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
|
|
|
|
}
|