9 lines
244 B
Rust
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
|
|
}
|