about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-06-06 03:01:57 -0700
committerbors <bors@rust-lang.org>2014-06-06 03:01:57 -0700
commit76baa5f0864f7aedb5b0ec918f1ad465886904cb (patch)
tree99bfd5fcb511fbb11944fcec1f311b26036bd047
parent732e057815e3faea4b257b47d31a8005ad1694f2 (diff)
parent75891274c461c8e097d8c0042df053dd01d3b43e (diff)
auto merge of #14668 : aochagavia/rust/pr3, r=alexcrichton
Closes https://github.com/mozilla/rust/issues/14577
Closes https://github.com/mozilla/rust/issues/14639
-rw-r--r--src/libcollections/vec.rs4
-rw-r--r--src/libcore/slice.rs4
-rw-r--r--src/libnum/bigint.rs8
3 files changed, 12 insertions, 4 deletions
diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs
index 1f2d176ab9b..aa80a131811 100644
--- a/src/libcollections/vec.rs
+++ b/src/libcollections/vec.rs
@@ -782,11 +782,11 @@ impl<T> Vec<T> {
         self.as_mut_slice().sort_by(compare)
     }
 
-    /// Returns a slice of `self` between `start` and `end`.
+    /// Returns a slice of self spanning the interval [`start`, `end`).
     ///
     /// # Failure
     ///
-    /// Fails when `start` or `end` point outside the bounds of `self`, or when
+    /// Fails when the slice (or part of it) is outside the bounds of self, or when
     /// `start` > `end`.
     ///
     /// # Example
diff --git a/src/libcore/slice.rs b/src/libcore/slice.rs
index 6312d9115ef..0257911e8c0 100644
--- a/src/libcore/slice.rs
+++ b/src/libcore/slice.rs
@@ -366,9 +366,9 @@ impl<T> Container for ~[T] {
 /// Extension methods for vectors
 pub trait ImmutableVector<'a, T> {
     /**
-     * Returns a slice of self between `start` and `end`.
+     * Returns a slice of self spanning the interval [`start`, `end`).
      *
-     * Fails when `start` or `end` point outside the bounds of self,
+     * Fails when the slice (or part of it) is outside the bounds of self,
      * or when `start` > `end`.
      */
     fn slice(&self, start: uint, end: uint) -> &'a [T];
diff --git a/src/libnum/bigint.rs b/src/libnum/bigint.rs
index 4a848535b8d..67501c9795d 100644
--- a/src/libnum/bigint.rs
+++ b/src/libnum/bigint.rs
@@ -653,6 +653,8 @@ impl FromStrRadix for BigUint {
 
 impl BigUint {
     /// Creates and initializes a `BigUint`.
+    ///
+    /// The digits are be in base 2^32.
     #[inline]
     pub fn new(v: Vec<BigDigit>) -> BigUint {
         // omit trailing zeros
@@ -665,6 +667,8 @@ impl BigUint {
     }
 
     /// Creates and initializes a `BigUint`.
+    ///
+    /// The digits are be in base 2^32.
     #[inline]
     pub fn from_slice(slice: &[BigDigit]) -> BigUint {
         return BigUint::new(Vec::from_slice(slice));
@@ -1315,12 +1319,16 @@ impl<R: Rng> RandBigInt for R {
 
 impl BigInt {
     /// Creates and initializes a BigInt.
+    ///
+    /// The digits are be in base 2^32.
     #[inline]
     pub fn new(sign: Sign, v: Vec<BigDigit>) -> BigInt {
         BigInt::from_biguint(sign, BigUint::new(v))
     }
 
     /// Creates and initializes a `BigInt`.
+    ///
+    /// The digits are be in base 2^32.
     #[inline]
     pub fn from_biguint(sign: Sign, data: BigUint) -> BigInt {
         if sign == Zero || data.is_zero() {