about summary refs log tree commit diff
path: root/src/libstd/sync
diff options
context:
space:
mode:
authorOliver Scherer <github35764891676564198441@oli-obk.de>2019-12-08 01:43:10 +0100
committerOliver Scherer <github35764891676564198441@oli-obk.de>2019-12-13 11:27:02 +0100
commit5e17e3988165d3245e38af0b1c40cde47699f6a7 (patch)
tree306b98ec54bf16d1327e0264b51d356bdba02d9b /src/libstd/sync
parentd75c7530f38b56c4d916195570cdcd18c12ce273 (diff)
downloadrust-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/libstd/sync')
-rw-r--r--src/libstd/sync/once.rs1
1 files changed, 1 insertions, 0 deletions
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 }
     }