about summary refs log tree commit diff
path: root/src/liballoc/string.rs
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-09-16 17:09:34 +0200
committerGitHub <noreply@github.com>2019-09-16 17:09:34 +0200
commitbe327a8f692919fd26742e6b88918878f67d60dd (patch)
treee19cbb400b987b43bb86402085db3ca10d11c9f9 /src/liballoc/string.rs
parentf432d5030ed4c16932cab88bbf71175cd285a03b (diff)
parent9b3e11f635c0354040ce515ac0ed4fade6fe928f (diff)
downloadrust-be327a8f692919fd26742e6b88918878f67d60dd.tar.gz
rust-be327a8f692919fd26742e6b88918878f67d60dd.zip
Rollup merge of #64028 - Centril:stabilize-alloc-new-2, r=alexcrichton
Stabilize `Vec::new` and `String::new` as `const fn`s

Closes https://github.com/rust-lang/rust/issues/64022.

r? @oli-obk
Diffstat (limited to 'src/liballoc/string.rs')
-rw-r--r--src/liballoc/string.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/liballoc/string.rs b/src/liballoc/string.rs
index b65f191836e..1166e7b5df2 100644
--- a/src/liballoc/string.rs
+++ b/src/liballoc/string.rs
@@ -369,7 +369,7 @@ impl String {
     /// ```
     #[inline]
     #[stable(feature = "rust1", since = "1.0.0")]
-    #[rustc_const_unstable(feature = "const_string_new")]
+    #[cfg_attr(bootstrap, rustc_const_unstable(feature = "const_string_new"))]
     pub const fn new() -> String {
         String { vec: Vec::new() }
     }