1
Fork 0

Fix documentation for slice()

Fixes https://github.com/mozilla/rust/issues/14577
This commit is contained in:
Adolfo Ochagavía 2014-06-05 09:33:49 +02:00
parent ae9577052d
commit 7d07a1e74b
2 changed files with 4 additions and 4 deletions

View file

@ -782,11 +782,11 @@ impl<T> Vec<T> {
self.as_mut_slice().sort_by(compare) 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 /// # 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`. /// `start` > `end`.
/// ///
/// # Example /// # Example

View file

@ -366,9 +366,9 @@ impl<T> Container for ~[T] {
/// Extension methods for vectors /// Extension methods for vectors
pub trait ImmutableVector<'a, T> { 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`. * or when `start` > `end`.
*/ */
fn slice(&self, start: uint, end: uint) -> &'a [T]; fn slice(&self, start: uint, end: uint) -> &'a [T];