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/collections/linked_list.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/liballoc/collections') diff --git a/src/liballoc/collections/linked_list.rs b/src/liballoc/collections/linked_list.rs index 6ee22834a46..4a74a479e71 100644 --- a/src/liballoc/collections/linked_list.rs +++ b/src/liballoc/collections/linked_list.rs @@ -275,6 +275,10 @@ impl LinkedList { /// let list: LinkedList = LinkedList::new(); /// ``` #[inline] + #[cfg_attr( + not(bootstrap), + rustc_const_stable(feature = "const_linked_list_new", since = "1.32.0"), + )] #[stable(feature = "rust1", since = "1.0.0")] pub const fn new() -> Self { LinkedList { -- cgit 1.4.1-3-g733a5