about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPiotr Jawniak <sawyer47@gmail.com>2014-05-19 15:39:16 +0200
committerPiotr Jawniak <sawyer47@gmail.com>2014-05-19 15:41:06 +0200
commitcea63ecfb149ba25c204c2ce0bcdb32a68983e70 (patch)
treeb1f94ed74698d1aa6ded5bf51ecc725e1c35270e
parent5d2edddc304a7cd8c95ba8b0beb06f0b4ebaca37 (diff)
downloadrust-cea63ecfb149ba25c204c2ce0bcdb32a68983e70.tar.gz
rust-cea63ecfb149ba25c204c2ce0bcdb32a68983e70.zip
Minor doc fixes in various places
-rw-r--r--src/doc/rust.md10
-rw-r--r--src/doc/tutorial.md2
-rw-r--r--src/libcore/bool.rs5
-rw-r--r--src/libcore/num/mod.rs38
-rw-r--r--src/libstd/num/mod.rs2
5 files changed, 32 insertions, 25 deletions
diff --git a/src/doc/rust.md b/src/doc/rust.md
index 4986ad1ba99..c312f2c1fe5 100644
--- a/src/doc/rust.md
+++ b/src/doc/rust.md
@@ -2943,7 +2943,7 @@ See [Break expressions](#break-expressions) and [Continue expressions](#continue
 break_expr : "break" [ lifetime ];
 ~~~~
 
-A `break` expression has an optional `label`.
+A `break` expression has an optional _label_.
 If the label is absent, then executing a `break` expression immediately terminates the innermost loop enclosing it.
 It is only permitted in the body of a loop.
 If the label is present, then `break foo` terminates the loop with label `foo`,
@@ -2956,7 +2956,7 @@ but must enclose it.
 continue_expr : "continue" [ lifetime ];
 ~~~~
 
-A `continue` expression has an optional `label`.
+A `continue` expression has an optional _label_.
 If the label is absent,
 then executing a `continue` expression immediately terminates the current iteration of the innermost loop enclosing it,
 returning control to the loop *head*.
@@ -3115,7 +3115,7 @@ let x: List<int> = Cons(10, box Cons(11, box Nil));
 
 match x {
     Cons(a, box Cons(b, _)) => {
-        process_pair(a,b);
+        process_pair(a, b);
     }
     Cons(10, _) => {
         process_ten();
@@ -3329,8 +3329,8 @@ order specified by the tuple type.
 An example of a tuple type and its use:
 
 ~~~~
-type Pair<'a> = (int,&'a str);
-let p: Pair<'static> = (10,"hello");
+type Pair<'a> = (int, &'a str);
+let p: Pair<'static> = (10, "hello");
 let (a, b) = p;
 assert!(b != "world");
 ~~~~
diff --git a/src/doc/tutorial.md b/src/doc/tutorial.md
index ad77b90e79b..4e3688a060d 100644
--- a/src/doc/tutorial.md
+++ b/src/doc/tutorial.md
@@ -2602,7 +2602,7 @@ fn main() {
 ~~~
 
 The full list of derivable traits is `Eq`, `TotalEq`, `Ord`,
-`TotalOrd`, `Encodable` `Decodable`, `Clone`,
+`TotalOrd`, `Encodable`, `Decodable`, `Clone`,
 `Hash`, `Rand`, `Default`, `Zero`, `FromPrimitive` and `Show`.
 
 # Crates and the module system
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
diff --git a/src/libstd/num/mod.rs b/src/libstd/num/mod.rs
index 3178fcbd66f..40167718236 100644
--- a/src/libstd/num/mod.rs
+++ b/src/libstd/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)]