From 5e17e3988165d3245e38af0b1c40cde47699f6a7 Mon Sep 17 00:00:00 2001 From: Oliver Scherer Date: Sun, 8 Dec 2019 01:43:10 +0100 Subject: Require stable/unstable annotations for the constness of all stable functions with a `const` modifier --- src/liballoc/string.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/liballoc/string.rs') 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() } -- cgit 1.4.1-3-g733a5