diff options
| author | Oliver Scherer <github35764891676564198441@oli-obk.de> | 2019-12-08 01:43:10 +0100 |
|---|---|---|
| committer | Oliver Scherer <github35764891676564198441@oli-obk.de> | 2019-12-13 11:27:02 +0100 |
| commit | 5e17e3988165d3245e38af0b1c40cde47699f6a7 (patch) | |
| tree | 306b98ec54bf16d1327e0264b51d356bdba02d9b /src/liballoc/string.rs | |
| parent | d75c7530f38b56c4d916195570cdcd18c12ce273 (diff) | |
| download | rust-5e17e3988165d3245e38af0b1c40cde47699f6a7.tar.gz rust-5e17e3988165d3245e38af0b1c40cde47699f6a7.zip | |
Require stable/unstable annotations for the constness of all stable functions with a `const` modifier
Diffstat (limited to 'src/liballoc/string.rs')
| -rw-r--r-- | src/liballoc/string.rs | 4 |
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() } |
