From c7104be1a37daa2f7ec114913247dc93524fd48e Mon Sep 17 00:00:00 2001 From: Fourchaux Date: Tue, 15 Aug 2017 21:45:21 +0200 Subject: Fix typos & us spellings --- src/libcore/num/dec2flt/rawfp.rs | 6 +++--- src/libcore/ops/try.rs | 2 +- src/libcore/sync/atomic.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/libcore') 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(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); /// } /// -- cgit 1.4.1-3-g733a5 From 02aaa1180eca1c1a5979eb5b106ed1befba8a42e Mon Sep 17 00:00:00 2001 From: Martin Hoffmann Date: Wed, 16 Aug 2017 17:02:39 +0200 Subject: Document that std::hash::Hasher::finish() does not reset the hasher. --- src/libcore/hash/mod.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/libcore') 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; -- cgit 1.4.1-3-g733a5 From fa346fc5d661d39fd7806b13b55a3d6f6ed33cb1 Mon Sep 17 00:00:00 2001 From: Anthony Clays Date: Thu, 17 Aug 2017 10:57:17 +0200 Subject: Fixed typo in RefCell::get_mut --- src/libcore/cell.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libcore') 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 RefCell { /// [`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 /// -- cgit 1.4.1-3-g733a5