-
Notifications
You must be signed in to change notification settings - Fork 163
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
alloccrate forno_stdcompatibility (alloc is now stable #159, Requires Rust 1.36). - Replace
mem::uninitializedwithMaybeUninit(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
unreachablecrate withstd::hint::unreachable_unchecked(Maybe remove the 'unreachable' crate dependency? #128, Requires Rust 1.27).
Breaking API changes:
- Change
drainmethod to take aRangeBoundsargument (change drain to be consistent withVec#142, Requires Rust 1.28).
Deprecations:
- Remove deprecated
SmallVecNtype aliases. - Remove deprecated
push_all_movemethod. - Remove deprecated
VecLiketrait.
Still depends on unstable Rust features. Postpone until 2.0:
- Use const generics to change
SmallVec<[T; N]>toSmallVec<T, N>. Remove theArraytrait. (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, andfromfor slices ofCopytypes. Deprecate and removeextend_from_slice,insert_from_slice, andfrom_slice(Tracking issue for specialization (RFC 1210) rust-lang/rust#31844). - Use the
unionrepresentation by default and remove the optionalunionfeature added in Use a union to reduce the size of SmallVec [v2] #94 (Untagged unions (tracking issue for RFC 1444) rust-lang/rust#32836).
koutheir
Metadata
Metadata
Assignees
Labels
No labels