//@ check-pass union URes { uninit: (), init: R, } struct Params { function: F, result: URes, } unsafe extern "C" fn do_call(params: *mut Params) where R: Copy, F: Fn() -> R, { (*params).result.init = ((*params).function)(); } fn main() {}