about summary refs log tree commit diff
path: root/src/liballoc/string.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/liballoc/string.rs')
-rw-r--r--src/liballoc/string.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/liballoc/string.rs b/src/liballoc/string.rs
index f7dff4c21f7..bf9bbba4753 100644
--- a/src/liballoc/string.rs
+++ b/src/liballoc/string.rs
@@ -367,6 +367,10 @@ impl String {
     /// let s = String::new();
     /// ```
     #[inline]
+    #[cfg_attr(
+        not(bootstrap),
+        rustc_const_stable(feature = "const_string_new", since = "1.32.0"),
+    )]
     #[stable(feature = "rust1", since = "1.0.0")]
     pub const fn new() -> String {
         String { vec: Vec::new() }