Skip to content

Commit 247df6e

Browse files
authored
Don't recommend ONCE_INIT in std::sync::Once
ONCE_INIT is deprecated, and so suggesting it as not only being on par with, but before `Once::new` is a bad idea.
1 parent f54911c commit 247df6e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/libstd/sync/once.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,9 @@ use crate::thread::{self, Thread};
6060

6161
/// A synchronization primitive which can be used to run a one-time global
6262
/// initialization. Useful for one-time initialization for FFI or related
63-
/// functionality. This type can only be constructed with the [`ONCE_INIT`]
64-
/// value or the equivalent [`Once::new`] constructor.
63+
/// functionality. This type can only be constructed with the [`Once::new`]
64+
/// constructor.
6565
///
66-
/// [`ONCE_INIT`]: constant.ONCE_INIT.html
6766
/// [`Once::new`]: struct.Once.html#method.new
6867
///
6968
/// # Examples

0 commit comments

Comments
 (0)