This is a soundness fix w.r.t unsafe coding guidelines.
In some of the instances, `get_unchecked_mut() -> &mut T as *mut T` was
used in places where the element was potentially uninitialized.
This was a problem in push. (Not a problem in IntoIter next/next_back,
where the whole range we're iterating is initialized).
Using the following principles:
- Trivial methods (empty and simple constants) can be inline(always)
- Generic methods don't need any inlining directive at all.
..with the exception of Deref which just seems to be extra important.
- Non-generic items use #[inline] to enable inlining at the
compiler's discretion.
With the release of arrayvec 0.5, these crates are unused.
With the release of Rust 1.36 and MaybeUninit, these crates have no
purpose (but for older Rust releases).
This is a nicer and simpler interface to expose, since the ref to uninit
array to pointer cast is not usable anyway (it's historic now, arrayvec
itself does not use it anymore).
The raw pointer walk did not do the right thing for ZST, because when
offsets are zero, the start and end pointer would be the same and the
loop ends before incrementing the length correctly.
This is very useful for generic code that may want to parse arbitrary
input string into arbitrary other types.
Limitations of the FromStr trait don't allow us to keep the original string slice
inside the CapacityError, unfortunately.
* '0.4' of https://github.com/bluss/arrayvec:
0.4.10
FIX: Remove unused Copy/Clone for MaybeUninit
FIX: Use repr(C) MaybeUninit after discussion with RalfJung
We have a recommendation from the unsafe-wg (no rule yet), that
repr(C) for unions should work this way, so that we can cast from the
union type to one of its fields.
We have a recommendation from the unsafe-wg (no rule yet), that
repr(C) for unions should work this way, so that we can cast from the
union type to one of its fields.