Closed
Description
My code:
pub struct LockedClosure<F> {
closure: Mutex<F>
}
impl<F, Args, Result> Fn<Args, Result> for LockedClosure<F>
where F: FnMut<Args, Result>, F:Send
{
#[rust_call_abi_hack]
fn call(&self, args: Args) -> Result {
self.closure.lock().deref_mut().call_mut(args)
}
}
I get an ICE 'argument to function with "rust-call" ABI is neither a tuple nor unit', which is perfectly reasonable. This seems like a useful thing to do however, and due to the where clause, args
will in fact be a tuple or unit.