Closed
Description
This is a list of breaking changes that we would like to make before stabilizing the API for smallvec 1.0.
Increases the minimum Rust version from 1.20:
- Use the
alloc
crate forno_std
compatibility (alloc is now stable #159, Requires Rust 1.36). - Replace
mem::uninitialized
withMaybeUninit
(Possible UB from use of uninitialized[&T; N]
#126, Requires Rust 1.36). - Use
NonNull<T>
instead of*mut T
(Use NonNull instead of a raw pointer #171, Requires Rust 1.25). - Replace the
unreachable
crate withstd::hint::unreachable_unchecked
(Maybe remove the 'unreachable' crate dependency? #128, Requires Rust 1.27).
Breaking API changes:
- Change
drain
method to take aRangeBounds
argument (change drain to be consistent withVec
#142, Requires Rust 1.28).
Deprecations:
- Remove deprecated
SmallVecN
type aliases. - Remove deprecated
push_all_move
method. - Remove deprecated
VecLike
trait.
Still depends on unstable Rust features. Postpone until 2.0:
- Use const generics to change
SmallVec<[T; N]>
toSmallVec<T, N>
. Remove theArray
trait. (Tracking issue for const generics (RFC 2000) rust-lang/rust#44580). - Support custom allocators (Support parametric allocators #55, Allocator traits and std::heap rust-lang/rust#32838).
- Use specialization to optimize
extend
,insert_many
, andfrom
for slices ofCopy
types. Deprecate and removeextend_from_slice
,insert_from_slice
, andfrom_slice
(Tracking issue for specialization (RFC 1210) rust-lang/rust#31844). - Use the
union
representation by default and remove the optionalunion
feature added in Use a union to reduce the size of SmallVec [v2] #94 (Untagged unions (tracking issue for RFC 1444) rust-lang/rust#32836).
Metadata
Metadata
Assignees
Labels
No labels