Skip to content

Commit 56bbc68

Browse files
aochagaviamcpherrinm
authored andcommitted
Fix documentation for slice()
Fixes rust-lang#14577
1 parent 78282e8 commit 56bbc68

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-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];

0 commit comments

Comments
 (0)