about summary refs log tree commit diff
path: root/src/libstd/sync
diff options
context:
space:
mode:
authorTobias Bucher <tobiasbucher5991@gmail.com>2018-05-24 14:08:47 +0200
committerTobias Bucher <tobiasbucher5991@gmail.com>2018-05-24 14:08:47 +0200
commit1c2abda671ace3935a70b9d4c44bf944e1d34189 (patch)
tree7ba75bab658b9608ab270fbd5916ded6eaba6d99 /src/libstd/sync
parent7426f5ccf7b362785a5abeb365674d3da3d4df2e (diff)
downloadrust-1c2abda671ace3935a70b9d4c44bf944e1d34189.tar.gz
rust-1c2abda671ace3935a70b9d4c44bf944e1d34189.zip
Add `Once::new` as a way of constructing a `Once`
Diffstat (limited to 'src/libstd/sync')
-rw-r--r--src/libstd/sync/once.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstd/sync/once.rs b/src/libstd/sync/once.rs
index 6fd8b6a5bba..138993e2271 100644
--- a/src/libstd/sync/once.rs
+++ b/src/libstd/sync/once.rs
@@ -73,9 +73,10 @@ use thread::{self, Thread};
 /// 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.
+/// value or the equivalent [`Once::new`] constructor.
 ///
 /// [`ONCE_INIT`]: constant.ONCE_INIT.html
+/// [`Once::new`]: struct.Once.html#method.new
 ///
 /// # Examples
 ///