summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-22034.rs
blob: ed741779f6807cafbb027c0feb1051c46c8a5f3e (plain)
1
2
3
4
5
6
7
8
9
10
11
#![feature(rustc_private)]

extern crate libc;

fn main() {
    let ptr: *mut () = core::ptr::null_mut();
    let _: &mut dyn Fn() = unsafe {
        &mut *(ptr as *mut dyn Fn())
        //~^ ERROR expected a `Fn()` closure, found `()`
    };
}