From 7d07a1e74b1f0741777272e533b7eff452eb01e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20Ochagav=C3=ADa?= Date: Thu, 5 Jun 2014 09:33:49 +0200 Subject: [PATCH] Fix documentation for `slice()` Fixes https://github.com/mozilla/rust/issues/14577 --- src/libcollections/vec.rs | 4 ++-- src/libcore/slice.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs index 1f2d176ab9b2..aa80a131811c 100644 --- a/src/libcollections/vec.rs +++ b/src/libcollections/vec.rs @@ -782,11 +782,11 @@ impl Vec { 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 6312d9115eff..0257911e8c08 100644 --- a/src/libcore/slice.rs +++ b/src/libcore/slice.rs @@ -366,9 +366,9 @@ impl 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];