diff options
| author | Piotr Jawniak <sawyer47@gmail.com> | 2014-05-19 15:39:16 +0200 |
|---|---|---|
| committer | Piotr Jawniak <sawyer47@gmail.com> | 2014-05-19 15:41:06 +0200 |
| commit | cea63ecfb149ba25c204c2ce0bcdb32a68983e70 (patch) | |
| tree | b1f94ed74698d1aa6ded5bf51ecc725e1c35270e /src/libcore | |
| parent | 5d2edddc304a7cd8c95ba8b0beb06f0b4ebaca37 (diff) | |
| download | rust-cea63ecfb149ba25c204c2ce0bcdb32a68983e70.tar.gz rust-cea63ecfb149ba25c204c2ce0bcdb32a68983e70.zip | |
Minor doc fixes in various places
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/bool.rs | 5 | ||||
| -rw-r--r-- | src/libcore/num/mod.rs | 38 |
2 files changed, 25 insertions, 18 deletions
diff --git a/src/libcore/bool.rs b/src/libcore/bool.rs index 0f632f4d4d0..2a44d141719 100644 --- a/src/libcore/bool.rs +++ b/src/libcore/bool.rs @@ -15,11 +15,14 @@ //! Implementations of the following traits: //! //! * `Not` +//! * `BitAnd` +//! * `BitOr` +//! * `BitXor` //! * `Ord` //! * `TotalOrd` //! * `Eq` +//! * `TotalEq` //! * `Default` -//! * `Zero` //! //! A `to_bit` conversion function. diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs index 47be5df67ea..03eca8b12b8 100644 --- a/src/libcore/num/mod.rs +++ b/src/libcore/num/mod.rs @@ -11,7 +11,7 @@ //! Numeric traits and functions for generic mathematics //! //! These are implemented for the primitive numeric types in `std::{u8, u16, -//! u32, u64, uint, i8, i16, i32, i64, int, f32, f64, float}`. +//! u32, u64, uint, i8, i16, i32, i64, int, f32, f64}`. #![allow(missing_doc)] @@ -97,7 +97,7 @@ pub trait One: Mul<Self, Self> { pub trait Signed: Num + Neg<Self> { /// Computes the absolute value. /// - /// For float, f32, and f64, `NaN` will be returned if the number is `NaN`. + /// For `f32` and `f64`, `NaN` will be returned if the number is `NaN`. fn abs(&self) -> Self; /// The positive difference of two numbers. @@ -108,15 +108,17 @@ pub trait Signed: Num + Neg<Self> { /// Returns the sign of the number. /// - /// For `float`, `f32`, `f64`: - /// * `1.0` if the number is positive, `+0.0` or `INFINITY` - /// * `-1.0` if the number is negative, `-0.0` or `NEG_INFINITY` - /// * `NaN` if the number is `NaN` + /// For `f32` and `f64`: + /// + /// * `1.0` if the number is positive, `+0.0` or `INFINITY` + /// * `-1.0` if the number is negative, `-0.0` or `NEG_INFINITY` + /// * `NaN` if the number is `NaN` /// /// For `int`: - /// * `0` if the number is zero - /// * `1` if the number is positive - /// * `-1` if the number is negative + /// + /// * `0` if the number is zero + /// * `1` if the number is positive + /// * `-1` if the number is negative fn signum(&self) -> Self; /// Returns true if the number is positive and false if the number is zero or negative. @@ -128,7 +130,7 @@ pub trait Signed: Num + Neg<Self> { /// Computes the absolute value. /// -/// For float, f32, and f64, `NaN` will be returned if the number is `NaN` +/// For `f32` and `f64`, `NaN` will be returned if the number is `NaN` #[inline(always)] pub fn abs<T: Signed>(value: T) -> T { value.abs() @@ -145,15 +147,17 @@ pub fn abs_sub<T: Signed>(x: T, y: T) -> T { /// Returns the sign of the number. /// -/// For float, f32, f64: -/// - `1.0` if the number is positive, `+0.0` or `INFINITY` -/// - `-1.0` if the number is negative, `-0.0` or `NEG_INFINITY` -/// - `NAN` if the number is `NAN` +/// For `f32` and `f64`: +/// +/// * `1.0` if the number is positive, `+0.0` or `INFINITY` +/// * `-1.0` if the number is negative, `-0.0` or `NEG_INFINITY` +/// * `NaN` if the number is `NaN` /// /// For int: -/// - `0` if the number is zero -/// - `1` if the number is positive -/// - `-1` if the number is negative +/// +/// * `0` if the number is zero +/// * `1` if the number is positive +/// * `-1` if the number is negative #[inline(always)] pub fn signum<T: Signed>(value: T) -> T { value.signum() } /// A trait for values which cannot be negative |
