diff options
| author | bors <bors@rust-lang.org> | 2016-02-09 22:28:45 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2016-02-09 22:28:45 +0000 |
| commit | 32b2ef7add2836cba5867d2e5ac9610cef416447 (patch) | |
| tree | 4e7fd04d0b3cac99c23257d42a79cf4d58b53af1 /src/libcore | |
| parent | 096dbf84c7acc78283adfa46eecd41d7355f6f3e (diff) | |
| parent | af1a0a346639966373206b70d7cd6376937bb544 (diff) | |
| download | rust-32b2ef7add2836cba5867d2e5ac9610cef416447.tar.gz rust-32b2ef7add2836cba5867d2e5ac9610cef416447.zip | |
Auto merge of #31523 - steveklabnik:rollup, r=steveklabnik
- Successful merges: #31473, #31513, #31514, #31515, #31516, #31520 - Failed merges:
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/convert.rs | 2 | ||||
| -rw-r--r-- | src/libcore/num/dec2flt/mod.rs | 7 | ||||
| -rw-r--r-- | src/libcore/num/mod.rs | 13 | ||||
| -rw-r--r-- | src/libcore/str/mod.rs | 2 | ||||
| -rw-r--r-- | src/libcore/tuple.rs | 19 |
5 files changed, 22 insertions, 21 deletions
diff --git a/src/libcore/convert.rs b/src/libcore/convert.rs index c207ad16595..b4ac020795c 100644 --- a/src/libcore/convert.rs +++ b/src/libcore/convert.rs @@ -19,7 +19,7 @@ //! //! - Impl the `As*` traits for reference-to-reference conversions //! - Impl the `Into` trait when you want to consume the value in the conversion -//! - The `From` trait is the most flexible, usefull for values _and_ references conversions +//! - The `From` trait is the most flexible, useful for values _and_ references conversions //! //! As a library writer, you should prefer implementing `From<T>` rather than //! `Into<U>`, as `From` provides greater flexibility and offer the equivalent `Into` diff --git a/src/libcore/num/dec2flt/mod.rs b/src/libcore/num/dec2flt/mod.rs index c0690c24bbb..9e946dc65c2 100644 --- a/src/libcore/num/dec2flt/mod.rs +++ b/src/libcore/num/dec2flt/mod.rs @@ -149,6 +149,13 @@ from_str_float_impl!(f32); from_str_float_impl!(f64); /// An error which can be returned when parsing a float. +/// +/// This error is used as the error type for the [`FromStr`] implementation +/// for [`f32`] and [`f64`]. +/// +/// [`FromStr`]: ../str/trait.FromStr.html +/// [`f32`]: ../primitive.f32.html +/// [`f64`]: ../primitive.f64.html #[derive(Debug, Clone, PartialEq)] #[stable(feature = "rust1", since = "1.0.0")] pub struct ParseFloatError { diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs index 99a74cf09f5..9a9dfaa2679 100644 --- a/src/libcore/num/mod.rs +++ b/src/libcore/num/mod.rs @@ -2160,7 +2160,13 @@ impl usize { intrinsics::mul_with_overflow } } -/// Used for representing the classification of floating point numbers +/// A classification of floating point numbers. +/// +/// This `enum` is used as the return type for [`f32::classify()`] and [`f64::classify()`]. See +/// their documentation for more. +/// +/// [`f32::classify()`]: ../primitive.f32.html#method.classify +/// [`f64::classify()`]: ../primitive.f64.html#method.classify #[derive(Copy, Clone, PartialEq, Debug)] #[stable(feature = "rust1", since = "1.0.0")] pub enum FpCategory { @@ -2387,6 +2393,11 @@ fn from_str_radix<T: FromStrRadixHelper>(src: &str, radix: u32) } /// An error which can be returned when parsing an integer. +/// +/// This error is used as the error type for the `from_str_radix()` functions +/// on the primitive integer types, such as [`i8::from_str_radix()`]. +/// +/// [`i8::from_str_radix()`]: ../std/primitive.i8.html#method.from_str_radix #[derive(Debug, Clone, PartialEq)] #[stable(feature = "rust1", since = "1.0.0")] pub struct ParseIntError { kind: IntErrorKind } diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs index f19970546d7..fa169416a10 100644 --- a/src/libcore/str/mod.rs +++ b/src/libcore/str/mod.rs @@ -1740,7 +1740,7 @@ impl StrExt for str { let mut matcher = pat.into_searcher(self); if let Some((a, b)) = matcher.next_reject() { i = a; - j = b; // Rember earliest known match, correct it below if + j = b; // Remember earliest known match, correct it below if // last match is different } if let Some((_, b)) = matcher.next_reject_back() { diff --git a/src/libcore/tuple.rs b/src/libcore/tuple.rs index 4127e182e1d..abaabfd129b 100644 --- a/src/libcore/tuple.rs +++ b/src/libcore/tuple.rs @@ -8,24 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -//! A finite heterogeneous sequence, `(T, U, ..)` -//! -//! To access a single element of a tuple one can use the `.0` -//! field access syntax. -//! -//! Indexing starts from zero, so `.0` returns first value, `.1` -//! returns second value, and so on. In general, a tuple with *N* -//! elements has field accessors from 0 to *N* - 1. -//! -//! If every type inside a tuple implements one of the following -//! traits, then a tuple itself also implements it. -//! -//! * `Clone` -//! * `PartialEq` -//! * `Eq` -//! * `PartialOrd` -//! * `Ord` -//! * `Default` +// See src/libstd/primitive_docs.rs for documentation. use clone::Clone; use cmp::*; |
