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/libstd/sync/once.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/libstd/sync') diff --git a/src/libstd/sync/once.rs b/src/libstd/sync/once.rs index e8e395247f9..d8df09071cd 100644 --- a/src/libstd/sync/once.rs +++ b/src/libstd/sync/once.rs @@ -188,6 +188,7 @@ struct WaiterQueue<'a> { impl Once { /// Creates a new `Once` value. #[stable(feature = "once_new", since = "1.2.0")] + #[cfg_attr(not(bootstrap), rustc_const_stable(feature = "const_once_new", since = "1.32.0"))] pub const fn new() -> Once { Once { state_and_queue: AtomicUsize::new(INCOMPLETE), _marker: marker::PhantomData } } -- cgit 1.4.1-3-g733a5