#[stable(feature = "rust1", since = "1.0.0")]
impl<T> ops::IndexMut<uint> for [T] {
- type Output = T;
-
fn index_mut(&mut self, &index: &uint) -> &mut T {
assert!(index < self.len());
#[stable(feature = "rust1", since = "1.0.0")]
impl<T> ops::IndexMut<ops::Range<uint>> for [T] {
- type Output = [T];
#[inline]
fn index_mut(&mut self, index: &ops::Range<uint>) -> &mut [T] {
assert!(index.start <= index.end);
}
#[stable(feature = "rust1", since = "1.0.0")]
impl<T> ops::IndexMut<ops::RangeTo<uint>> for [T] {
- type Output = [T];
#[inline]
fn index_mut(&mut self, index: &ops::RangeTo<uint>) -> &mut [T] {
self.index_mut(&ops::Range{ start: 0, end: index.end })
}
#[stable(feature = "rust1", since = "1.0.0")]
impl<T> ops::IndexMut<ops::RangeFrom<uint>> for [T] {
- type Output = [T];
#[inline]
fn index_mut(&mut self, index: &ops::RangeFrom<uint>) -> &mut [T] {
let len = self.len();
}
#[stable(feature = "rust1", since = "1.0.0")]
impl<T> ops::IndexMut<RangeFull> for [T] {
- type Output = [T];
#[inline]
fn index_mut(&mut self, _index: &RangeFull) -> &mut [T] {
self
#[unstable(feature = "core")]
impl<'a, T> ops::IndexMut<ops::Range<uint>> for IterMut<'a, T> {
- type Output = [T];
#[inline]
fn index_mut(&mut self, index: &ops::Range<uint>) -> &mut [T] {
self.index_mut(&RangeFull).index_mut(index)
}
#[unstable(feature = "core")]
impl<'a, T> ops::IndexMut<ops::RangeTo<uint>> for IterMut<'a, T> {
- type Output = [T];
#[inline]
fn index_mut(&mut self, index: &ops::RangeTo<uint>) -> &mut [T] {
self.index_mut(&RangeFull).index_mut(index)
}
#[unstable(feature = "core")]
impl<'a, T> ops::IndexMut<ops::RangeFrom<uint>> for IterMut<'a, T> {
- type Output = [T];
#[inline]
fn index_mut(&mut self, index: &ops::RangeFrom<uint>) -> &mut [T] {
self.index_mut(&RangeFull).index_mut(index)
}
#[unstable(feature = "core")]
impl<'a, T> ops::IndexMut<RangeFull> for IterMut<'a, T> {
- type Output = [T];
#[inline]
fn index_mut(&mut self, _index: &RangeFull) -> &mut [T] {
make_slice!(T => &mut [T]: self.ptr, self.end)