]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #65461 - Kampfkarren:patch-1, r=Centril
authorMazdak Farrokhzad <twingoow@gmail.com>
Thu, 17 Oct 2019 11:46:09 +0000 (13:46 +0200)
committerGitHub <noreply@github.com>
Thu, 17 Oct 2019 11:46:09 +0000 (13:46 +0200)
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.

src/libstd/sync/once.rs

index e529b8c4227fa7a1d4c6c5ca14f0cb070529380e..e28fbca7fa1c2ab10b934dae0f740e599fd1ec3a 100644 (file)
 
 /// A synchronization primitive which can be used to run a one-time global
 /// initialization. Useful for one-time initialization for FFI or related
-/// functionality. This type can only be constructed with the [`ONCE_INIT`]
-/// value or the equivalent [`Once::new`] constructor.
+/// functionality. This type can only be constructed with the [`Once::new`]
+/// constructor.
 ///
-/// [`ONCE_INIT`]: constant.ONCE_INIT.html
 /// [`Once::new`]: struct.Once.html#method.new
 ///
 /// # Examples