Skip to content

Commit 76baa5f

Browse files
committed
auto merge of #14668 : aochagavia/rust/pr3, r=alexcrichton
Closes #14577 Closes #14639
2 parents 732e057 + 7589127 commit 76baa5f

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

src/libcollections/vec.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -782,11 +782,11 @@ impl<T> Vec<T> {
782782
self.as_mut_slice().sort_by(compare)
783783
}
784784

785-
/// Returns a slice of `self` between `start` and `end`.
785+
/// Returns a slice of self spanning the interval [`start`, `end`).
786786
///
787787
/// # Failure
788788
///
789-
/// Fails when `start` or `end` point outside the bounds of `self`, or when
789+
/// Fails when the slice (or part of it) is outside the bounds of self, or when
790790
/// `start` > `end`.
791791
///
792792
/// # Example

src/libcore/slice.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,9 +366,9 @@ impl<T> Container for ~[T] {
366366
/// Extension methods for vectors
367367
pub trait ImmutableVector<'a, T> {
368368
/**
369-
* Returns a slice of self between `start` and `end`.
369+
* Returns a slice of self spanning the interval [`start`, `end`).
370370
*
371-
* Fails when `start` or `end` point outside the bounds of self,
371+
* Fails when the slice (or part of it) is outside the bounds of self,
372372
* or when `start` > `end`.
373373
*/
374374
fn slice(&self, start: uint, end: uint) -> &'a [T];

src/libnum/bigint.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,8 @@ impl FromStrRadix for BigUint {
653653

654654
impl BigUint {
655655
/// Creates and initializes a `BigUint`.
656+
///
657+
/// The digits are be in base 2^32.
656658
#[inline]
657659
pub fn new(v: Vec<BigDigit>) -> BigUint {
658660
// omit trailing zeros
@@ -665,6 +667,8 @@ impl BigUint {
665667
}
666668

667669
/// Creates and initializes a `BigUint`.
670+
///
671+
/// The digits are be in base 2^32.
668672
#[inline]
669673
pub fn from_slice(slice: &[BigDigit]) -> BigUint {
670674
return BigUint::new(Vec::from_slice(slice));
@@ -1315,12 +1319,16 @@ impl<R: Rng> RandBigInt for R {
13151319

13161320
impl BigInt {
13171321
/// Creates and initializes a BigInt.
1322+
///
1323+
/// The digits are be in base 2^32.
13181324
#[inline]
13191325
pub fn new(sign: Sign, v: Vec<BigDigit>) -> BigInt {
13201326
BigInt::from_biguint(sign, BigUint::new(v))
13211327
}
13221328

13231329
/// Creates and initializes a `BigInt`.
1330+
///
1331+
/// The digits are be in base 2^32.
13241332
#[inline]
13251333
pub fn from_biguint(sign: Sign, data: BigUint) -> BigInt {
13261334
if sign == Zero || data.is_zero() {

0 commit comments

Comments
 (0)