summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-40000.rs
blob: a6e05e7ba02a3c36620176edecab86e7bbaa1fcd (plain)
1
2
3
4
5
6
7
8
9
fn main() {
    let bar: fn(&mut u32) = |_| {};

    fn foo(x: Box<dyn Fn(&i32)>) {}
    let bar = Box::new(|x: &i32| {}) as Box<dyn Fn(_)>;
    foo(bar);
    //~^ ERROR mismatched types
    //~| ERROR mismatched types
}