Some libc functions, e.g. sigemptyset(set: *mut sigset_t) take a pointer to a variable, treat it as uninitialized and initialize it.
I end up with this code:
<
Luckily, tuples are normal types, too. So how about:
let (mut newmask, mut oldmask, mut pendmask) = std::mem::uninitialized();
However, it won't get much nicer than this. Your best bet is to combine all your variables into a bigger type (like a tuple or a struct) and un-initialize that.
But it's fine that unsafe things are verbose and annoying to write. Uninitialized variables are really quite dangerous, especially when dealing with Drop
types. I am sure you are already aware, but I still want to make sure everyone reads the documentation of uninitialized() to understand all possible pitfalls.