3 ms·
> I don’t use nightly Rust, so for now, new_zeroed() won’t work That's a completely fair observation. The main thing I want stabilised is a single niche for cu
by tialaramex 4y ago
> I don’t use nightly Rust, so for now, new_zeroed() won’t work
That's a completely fair observation. The main thing I want stabilised is a single niche for custom types. I would take more if offered but experience says that every extra little thing doubles the discussion time, so, one niche is all I need, and Rust guarantees this exists in some form so even if a later mechanism does - say - fancy non-contiguous niches, I just want one value ASAP.
https://github.com/rust-lang/rfcs/pull/3334 https://github.com/rust-lang/rfcs/pull/3334
> “I want to allocate something large on the heap” and it doesn’t seem like I should need to use nightly builds or unsafe{} to do it.
The former makes sense to me, the latter (a requirement to use unsafe) I can see there can be cases where the compiler has to do a lot of contortions to safely but optimally mint the type in place in the heap and just writing the unsafe case is reasonable. I don't know anything about your type so I can't judge.