diff options
| author | bors <bors@rust-lang.org> | 2017-10-13 17:42:25 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-10-13 17:42:25 +0000 |
| commit | 6cb49d2a3e86f0d2f220f12c59c0ebb2965ff38c (patch) | |
| tree | 601f0856be5a7da5d29c176fb415f7b803643670 /src/liballoc/vec.rs | |
| parent | 305e02281bf6e7a5398f93f86c901316074be0a5 (diff) | |
| parent | 8ea67902934728378acdd84a6050b9b4bed03ad5 (diff) | |
| download | rust-6cb49d2a3e86f0d2f220f12c59c0ebb2965ff38c.tar.gz rust-6cb49d2a3e86f0d2f220f12c59c0ebb2965ff38c.zip | |
Auto merge of #45261 - kennytm:rollup, r=kennytm
Rollup of 14 pull requests - Successful merges: #44855, #45110, #45122, #45133, #45173, #45178, #45189, #45203, #45209, #45221, #45236, #45240, #45245, #45253 - Failed merges:
Diffstat (limited to 'src/liballoc/vec.rs')
| -rw-r--r-- | src/liballoc/vec.rs | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/liballoc/vec.rs b/src/liballoc/vec.rs index 861291194f3..cf34e195dea 100644 --- a/src/liballoc/vec.rs +++ b/src/liballoc/vec.rs @@ -1543,6 +1543,7 @@ impl<T: Hash> Hash for Vec<T> { } #[stable(feature = "rust1", since = "1.0.0")] +#[rustc_on_unimplemented = "vector indices are of type `usize` or ranges of `usize`"] impl<T> Index<usize> for Vec<T> { type Output = T; @@ -1554,6 +1555,7 @@ impl<T> Index<usize> for Vec<T> { } #[stable(feature = "rust1", since = "1.0.0")] +#[rustc_on_unimplemented = "vector indices are of type `usize` or ranges of `usize`"] impl<T> IndexMut<usize> for Vec<T> { #[inline] fn index_mut(&mut self, index: usize) -> &mut T { @@ -1562,8 +1564,8 @@ impl<T> IndexMut<usize> for Vec<T> { } } - #[stable(feature = "rust1", since = "1.0.0")] +#[rustc_on_unimplemented = "vector indices are of type `usize` or ranges of `usize`"] impl<T> ops::Index<ops::Range<usize>> for Vec<T> { type Output = [T]; @@ -1572,7 +1574,9 @@ impl<T> ops::Index<ops::Range<usize>> for Vec<T> { Index::index(&**self, index) } } + #[stable(feature = "rust1", since = "1.0.0")] +#[rustc_on_unimplemented = "vector indices are of type `usize` or ranges of `usize`"] impl<T> ops::Index<ops::RangeTo<usize>> for Vec<T> { type Output = [T]; @@ -1581,7 +1585,9 @@ impl<T> ops::Index<ops::RangeTo<usize>> for Vec<T> { Index::index(&**self, index) } } + #[stable(feature = "rust1", since = "1.0.0")] +#[rustc_on_unimplemented = "vector indices are of type `usize` or ranges of `usize`"] impl<T> ops::Index<ops::RangeFrom<usize>> for Vec<T> { type Output = [T]; @@ -1590,7 +1596,9 @@ impl<T> ops::Index<ops::RangeFrom<usize>> for Vec<T> { Index::index(&**self, index) } } + #[stable(feature = "rust1", since = "1.0.0")] +#[rustc_on_unimplemented = "vector indices are of type `usize` or ranges of `usize`"] impl<T> ops::Index<ops::RangeFull> for Vec<T> { type Output = [T]; @@ -1599,7 +1607,9 @@ impl<T> ops::Index<ops::RangeFull> for Vec<T> { self } } + #[unstable(feature = "inclusive_range", reason = "recently added, follows RFC", issue = "28237")] +#[rustc_on_unimplemented = "vector indices are of type `usize` or ranges of `usize`"] impl<T> ops::Index<ops::RangeInclusive<usize>> for Vec<T> { type Output = [T]; @@ -1608,7 +1618,9 @@ impl<T> ops::Index<ops::RangeInclusive<usize>> for Vec<T> { Index::index(&**self, index) } } + #[unstable(feature = "inclusive_range", reason = "recently added, follows RFC", issue = "28237")] +#[rustc_on_unimplemented = "vector indices are of type `usize` or ranges of `usize`"] impl<T> ops::Index<ops::RangeToInclusive<usize>> for Vec<T> { type Output = [T]; @@ -1619,41 +1631,52 @@ impl<T> ops::Index<ops::RangeToInclusive<usize>> for Vec<T> { } #[stable(feature = "rust1", since = "1.0.0")] +#[rustc_on_unimplemented = "vector indices are of type `usize` or ranges of `usize`"] impl<T> ops::IndexMut<ops::Range<usize>> for Vec<T> { #[inline] fn index_mut(&mut self, index: ops::Range<usize>) -> &mut [T] { IndexMut::index_mut(&mut **self, index) } } + #[stable(feature = "rust1", since = "1.0.0")] +#[rustc_on_unimplemented = "vector indices are of type `usize` or ranges of `usize`"] impl<T> ops::IndexMut<ops::RangeTo<usize>> for Vec<T> { #[inline] fn index_mut(&mut self, index: ops::RangeTo<usize>) -> &mut [T] { IndexMut::index_mut(&mut **self, index) } } + #[stable(feature = "rust1", since = "1.0.0")] +#[rustc_on_unimplemented = "vector indices are of type `usize` or ranges of `usize`"] impl<T> ops::IndexMut<ops::RangeFrom<usize>> for Vec<T> { #[inline] fn index_mut(&mut self, index: ops::RangeFrom<usize>) -> &mut [T] { IndexMut::index_mut(&mut **self, index) } } + #[stable(feature = "rust1", since = "1.0.0")] +#[rustc_on_unimplemented = "vector indices are of type `usize` or ranges of `usize`"] impl<T> ops::IndexMut<ops::RangeFull> for Vec<T> { #[inline] fn index_mut(&mut self, _index: ops::RangeFull) -> &mut [T] { self } } + #[unstable(feature = "inclusive_range", reason = "recently added, follows RFC", issue = "28237")] +#[rustc_on_unimplemented = "vector indices are of type `usize` or ranges of `usize`"] impl<T> ops::IndexMut<ops::RangeInclusive<usize>> for Vec<T> { #[inline] fn index_mut(&mut self, index: ops::RangeInclusive<usize>) -> &mut [T] { IndexMut::index_mut(&mut **self, index) } } + #[unstable(feature = "inclusive_range", reason = "recently added, follows RFC", issue = "28237")] +#[rustc_on_unimplemented = "vector indices are of type `usize` or ranges of `usize`"] impl<T> ops::IndexMut<ops::RangeToInclusive<usize>> for Vec<T> { #[inline] fn index_mut(&mut self, index: ops::RangeToInclusive<usize>) -> &mut [T] { |
