rust/tests/ui/issues/issue-22034.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

8 lines
197 B
Rust
Raw Normal View History

fn main() {
let ptr: *mut () = core::ptr::null_mut();
2019-05-28 18:46:13 +00:00
let _: &mut dyn Fn() = unsafe {
&mut *(ptr as *mut dyn Fn())
//~^ ERROR expected a `Fn()` closure, found `()`
};
}