1
Fork 0

Update library functions with stability attributes

This may not be strictly minimal, but all unstable functions also need a
`rustc_const_unstable` attribute.
This commit is contained in:
Dylan MacKenzie 2020-09-17 11:02:56 -07:00
parent 3dd28c78c3
commit 110e59e70e
13 changed files with 22 additions and 0 deletions

View file

@ -150,6 +150,7 @@ impl<T> RawVec<T, Global> {
impl<T, A: AllocRef> RawVec<T, A> {
/// Like `new`, but parameterized over the choice of allocator for
/// the returned `RawVec`.
#[allow_internal_unstable(const_fn)]
pub const fn new_in(alloc: A) -> Self {
// `cap: 0` means "unallocated". zero-sized types are ignored.
Self { ptr: Unique::dangling(), cap: 0, alloc }