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
|
|
|
|
2019-05-28 14:46:13 -04:00
|
|
|
fn foo(x: Box<dyn Fn(&i32)>) {}
|
|
|
|
let bar = Box::new(|x: &i32| {}) as Box<dyn Fn(_)>;
|
2022-05-22 01:02:55 -04:00
|
|
|
foo(bar);
|
2022-04-01 13:13:25 -04:00
|
|
|
//~^ ERROR mismatched types
|
|
|
|
//~| ERROR mismatched types
|
2017-03-26 14:15:47 +03:00
|
|
|
}
|