switch allow_internal_unstable const fns to rustc_allow_const_fn_unstable
This commit is contained in:
parent
3948b054dc
commit
05f4a9a42a
24 changed files with 81 additions and 39 deletions
|
@ -72,6 +72,7 @@
|
|||
#![allow(explicit_outlives_requirements)]
|
||||
#![allow(incomplete_features)]
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
#![cfg_attr(not(bootstrap), feature(rustc_allow_const_fn_unstable))]
|
||||
#![cfg_attr(not(test), feature(generator_trait))]
|
||||
#![cfg_attr(test, feature(test))]
|
||||
#![cfg_attr(test, feature(new_uninit))]
|
||||
|
|
|
@ -150,7 +150,8 @@ 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)]
|
||||
#[cfg_attr(not(bootstrap), rustc_allow_const_fn_unstable(const_fn))]
|
||||
#[cfg_attr(bootstrap, 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 }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue