about summary refs log tree commit diff
path: root/library/std/src/sys/sync/once
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2024-10-26 09:40:03 +0200
committerRalf Jung <post@ralfj.de>2024-10-28 11:48:39 +0100
commitd066dfdb835f15fe2c4d2bdb31d88cb948b360ad (patch)
treeec737bedc6aff10a4cd1ab2d9de28fa4a8280ef8 /library/std/src/sys/sync/once
parentf370f3493d3c85c7032a98e6c22b419251f18d2a (diff)
downloadrust-d066dfdb835f15fe2c4d2bdb31d88cb948b360ad.tar.gz
rust-d066dfdb835f15fe2c4d2bdb31d88cb948b360ad.zip
we can now enable the 'const stable fn must be stable' check
Diffstat (limited to 'library/std/src/sys/sync/once')
-rw-r--r--library/std/src/sys/sync/once/no_threads.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/sys/sync/once/no_threads.rs b/library/std/src/sys/sync/once/no_threads.rs
index cdcffe790f5..fb1b496510a 100644
--- a/library/std/src/sys/sync/once/no_threads.rs
+++ b/library/std/src/sys/sync/once/no_threads.rs
@@ -35,7 +35,7 @@ unsafe impl Sync for Once {}
 
 impl Once {
     #[inline]
-    #[rustc_const_stable(feature = "const_once_new", since = "1.32.0")]
+    #[cfg_attr(bootstrap, rustc_const_stable(feature = "const_once_new", since = "1.32.0"))]
     pub const fn new() -> Once {
         Once { state: Cell::new(State::Incomplete) }
     }