about summary refs log tree commit diff
path: root/src/liballoc/vec.rs
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-08-29 11:32:38 +0200
committerMazdak Farrokhzad <twingoow@gmail.com>2019-09-16 16:45:16 +0200
commitd5fe5831ecc82d2705110810261b79ae4040c403 (patch)
treea8e0fa2044d0f23bd9df242f98e8e33c8f793502 /src/liballoc/vec.rs
parentb6269f27d99d7da9e95f0b3fdc53193dc8c42fbe (diff)
downloadrust-d5fe5831ecc82d2705110810261b79ae4040c403.tar.gz
rust-d5fe5831ecc82d2705110810261b79ae4040c403.zip
Const-stabilize `Vec::new`.
Diffstat (limited to 'src/liballoc/vec.rs')
-rw-r--r--src/liballoc/vec.rs4
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,
         }
     }