diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-08-29 11:32:38 +0200 |
|---|---|---|
| committer | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-09-16 16:45:16 +0200 |
| commit | d5fe5831ecc82d2705110810261b79ae4040c403 (patch) | |
| tree | a8e0fa2044d0f23bd9df242f98e8e33c8f793502 /src/liballoc/vec.rs | |
| parent | b6269f27d99d7da9e95f0b3fdc53193dc8c42fbe (diff) | |
| download | rust-d5fe5831ecc82d2705110810261b79ae4040c403.tar.gz rust-d5fe5831ecc82d2705110810261b79ae4040c403.zip | |
Const-stabilize `Vec::new`.
Diffstat (limited to 'src/liballoc/vec.rs')
| -rw-r--r-- | src/liballoc/vec.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/liballoc/vec.rs b/src/liballoc/vec.rs index c513658c842..405969a550b 100644 --- a/src/liballoc/vec.rs +++ b/src/liballoc/vec.rs @@ -314,10 +314,10 @@ impl<T> Vec<T> { /// ``` #[inline] #[stable(feature = "rust1", since = "1.0.0")] - #[rustc_const_unstable(feature = "const_vec_new")] + #[cfg_attr(bootstrap, rustc_const_unstable(feature = "const_vec_new"))] pub const fn new() -> Vec<T> { Vec { - buf: RawVec::new(), + buf: RawVec::NEW, len: 0, } } |
