rust/src/test/ui/issues/issue-22034.rs
2018-12-25 21:08:33 -07:00

12 lines
239 B
Rust

#![feature(rustc_private)]
extern crate libc;
fn main() {
let ptr: *mut () = 0 as *mut _;
let _: &mut Fn() = unsafe {
&mut *(ptr as *mut Fn())
//~^ ERROR expected a `std::ops::Fn<()>` closure, found `()`
};
}