about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-08-17 17:10:25 +0000
committerbors <bors@rust-lang.org>2017-08-17 17:10:25 +0000
commit59ccba995de202fb9d9a8d795d2770fb2d199db0 (patch)
treec3fb8fc436dc758eb7b2d7c6ddf438225671c3c0 /src/libcore
parentdd39ecf368a3cdb937e129f36a2a342d0c9358f0 (diff)
parent235fb23e553db0af9ac6e7d134a9f5a35bdf6619 (diff)
downloadrust-59ccba995de202fb9d9a8d795d2770fb2d199db0.tar.gz
rust-59ccba995de202fb9d9a8d795d2770fb2d199db0.zip
Auto merge of #43939 - frewsxcv:rollup, r=frewsxcv
Rollup of 9 pull requests

- Successful merges: #43891, #43905, #43912, #43914, #43915, #43916, #43920, #43928, #43930
- Failed merges:
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/cell.rs2
-rw-r--r--src/libcore/hash/mod.rs9
-rw-r--r--src/libcore/num/dec2flt/rawfp.rs6
-rw-r--r--src/libcore/ops/try.rs2
-rw-r--r--src/libcore/sync/atomic.rs2
5 files changed, 14 insertions, 7 deletions
diff --git a/src/libcore/cell.rs b/src/libcore/cell.rs
index 6068f1a7961..dc0905e2972 100644
--- a/src/libcore/cell.rs
+++ b/src/libcore/cell.rs
@@ -809,7 +809,7 @@ impl<T: ?Sized> RefCell<T> {
     /// [`borrow_mut`] method instead if `self` isn't mutable.
     ///
     /// Also, please be aware that this method is only for special circumstances and is usually
-    /// not you want. In case of doubt, use [`borrow_mut`] instead.
+    /// not what you want. In case of doubt, use [`borrow_mut`] instead.
     ///
     /// [`borrow_mut`]: #method.borrow_mut
     ///
diff --git a/src/libcore/hash/mod.rs b/src/libcore/hash/mod.rs
index 2000ba91460..a8b84203d6a 100644
--- a/src/libcore/hash/mod.rs
+++ b/src/libcore/hash/mod.rs
@@ -240,7 +240,12 @@ pub trait Hash {
 /// [`write_u8`]: #method.write_u8
 #[stable(feature = "rust1", since = "1.0.0")]
 pub trait Hasher {
-    /// Completes a round of hashing, producing the output hash generated.
+    /// Returns the hash value for the values written so far.
+    ///
+    /// Despite its name, the method does not reset the hasher’s internal
+    /// state. Additional [`write`]s will continue from the current value.
+    /// If you need to start a fresh hash value, you will have to create
+    /// a new hasher.
     ///
     /// # Examples
     ///
@@ -253,6 +258,8 @@ pub trait Hasher {
     ///
     /// println!("Hash is {:x}!", hasher.finish());
     /// ```
+    ///
+    /// ['write']: #tymethod.write
     #[stable(feature = "rust1", since = "1.0.0")]
     fn finish(&self) -> u64;
 
diff --git a/src/libcore/num/dec2flt/rawfp.rs b/src/libcore/num/dec2flt/rawfp.rs
index 2a60292d023..12960fed045 100644
--- a/src/libcore/num/dec2flt/rawfp.rs
+++ b/src/libcore/num/dec2flt/rawfp.rs
@@ -102,10 +102,10 @@ pub trait RawFloat : Float + Copy + Debug + LowerExp
     /// The number of bits in the exponent.
     const EXP_BITS: u8;
 
-    /// The number of bits in the singificand, *including* the hidden bit.
+    /// The number of bits in the significand, *including* the hidden bit.
     const SIG_BITS: u8;
 
-    /// The number of bits in the singificand, *excluding* the hidden bit.
+    /// The number of bits in the significand, *excluding* the hidden bit.
     const EXPLICIT_SIG_BITS: u8;
 
     /// The maximum legal exponent in fractional representation.
@@ -123,7 +123,7 @@ pub trait RawFloat : Float + Copy + Debug + LowerExp
     /// `MIN_EXP` for integral representation, i.e., with the shift applied.
     const MIN_EXP_INT: i16;
 
-    /// The maximum normalized singificand in integral representation.
+    /// The maximum normalized significand in integral representation.
     const MAX_SIG: u64;
 
     /// The minimal normalized significand in integral representation.
diff --git a/src/libcore/ops/try.rs b/src/libcore/ops/try.rs
index 4971e825a6f..78326c3e639 100644
--- a/src/libcore/ops/try.rs
+++ b/src/libcore/ops/try.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-/// A trait for customizing the behaviour of the `?` operator.
+/// A trait for customizing the behavior of the `?` operator.
 ///
 /// A type implementing `Try` is one that has a canonical way to view it
 /// in terms of a success/failure dichotomy.  This trait allows both
diff --git a/src/libcore/sync/atomic.rs b/src/libcore/sync/atomic.rs
index d647a94a1ef..510e01db0e9 100644
--- a/src/libcore/sync/atomic.rs
+++ b/src/libcore/sync/atomic.rs
@@ -1632,7 +1632,7 @@ unsafe fn atomic_xor<T>(dst: *mut T, val: T, order: Ordering) -> T {
 ///
 ///     pub fn lock(&self) {
 ///         while !self.flag.compare_and_swap(false, true, Ordering::Relaxed) {}
-///         // This fence syncronizes-with store in `unlock`.
+///         // This fence synchronizes-with store in `unlock`.
 ///         fence(Ordering::Acquire);
 ///     }
 ///