summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-22034.rs
blob: 405ffd089c245867057e3b4bb3d9cf00dc926a78 (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 `()`
    };
}