about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-02-18 17:10:34 +0000
committerbors <bors@rust-lang.org>2017-02-18 17:10:34 +0000
commit306035c21741928bef75b8915d2195cce400b70a (patch)
tree4aa49cfb106dc1deb4b2b52a11ea577efa7b21db /src/libstd
parent8f2fc9db15d41285619138900c6f65686bd32a2a (diff)
parent98c2cf2ae5ee9ec69d06b32964156a13c94f4402 (diff)
downloadrust-306035c21741928bef75b8915d2195cce400b70a.tar.gz
rust-306035c21741928bef75b8915d2195cce400b70a.zip
Auto merge of #39933 - GuillaumeGomez:rollup, r=GuillaumeGomez
Rollup of 5 pull requests

- Successful merges: #39847, #39862, #39898, #39904, #39928
- Failed merges:
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/env.rs15
-rw-r--r--src/libstd/sync/once.rs2
-rw-r--r--src/libstd/thread/local.rs4
3 files changed, 14 insertions, 7 deletions
diff --git a/src/libstd/env.rs b/src/libstd/env.rs
index 1ef2cb4ed15..dd4f1ff4f5e 100644
--- a/src/libstd/env.rs
+++ b/src/libstd/env.rs
@@ -96,7 +96,9 @@ pub struct VarsOs { inner: os_imp::Env }
 ///
 /// While iterating, the returned iterator will panic if any key or value in the
 /// environment is not valid unicode. If this is not desired, consider using the
-/// `env::vars_os` function.
+/// [`env::vars_os`] function.
+///
+/// [`env::vars_os`]: fn.vars_os.html
 ///
 /// # Examples
 ///
@@ -171,9 +173,12 @@ impl fmt::Debug for VarsOs {
 
 /// Fetches the environment variable `key` from the current process.
 ///
-/// The returned result is `Ok(s)` if the environment variable is present and is
+/// The returned result is [`Ok(s)`] if the environment variable is present and is
 /// valid unicode. If the environment variable is not present, or it is not
-/// valid unicode, then `Err` will be returned.
+/// valid unicode, then [`Err`] will be returned.
+///
+/// [`Ok(s)`]: ../result/enum.Result.html#variant.Ok
+/// [`Err`]: ../result/enum.Result.html#variant.Err
 ///
 /// # Examples
 ///
@@ -199,7 +204,9 @@ fn _var(key: &OsStr) -> Result<String, VarError> {
 }
 
 /// Fetches the environment variable `key` from the current process, returning
-/// `None` if the variable isn't set.
+/// [`None`] if the variable isn't set.
+///
+/// [`None`]: ../option/enum.Option.html#variant.None
 ///
 /// # Examples
 ///
diff --git a/src/libstd/sync/once.rs b/src/libstd/sync/once.rs
index ba993751391..1e7394c0b09 100644
--- a/src/libstd/sync/once.rs
+++ b/src/libstd/sync/once.rs
@@ -316,7 +316,7 @@ impl Once {
                         }
 
                         // Once we've enqueued ourselves, wait in a loop.
-                        // Aftewards reload the state and continue with what we
+                        // Afterwards reload the state and continue with what we
                         // were doing from before.
                         while !node.signaled.load(Ordering::SeqCst) {
                             thread::park();
diff --git a/src/libstd/thread/local.rs b/src/libstd/thread/local.rs
index 5166ddf8a21..66f09a7069c 100644
--- a/src/libstd/thread/local.rs
+++ b/src/libstd/thread/local.rs
@@ -28,8 +28,8 @@ use mem;
 /// # Initialization and Destruction
 ///
 /// Initialization is dynamically performed on the first call to `with()`
-/// within a thread, and values support destructors which will be run when a
-/// thread exits.
+/// within a thread, and values that implement `Drop` get destructed when a
+/// thread exits. Some caveats apply, which are explained below.
 ///
 /// # Examples
 ///