liballoc: adjust abolute imports + more import fixes.

This commit is contained in:
Mazdak Farrokhzad
2019-02-02 10:34:36 +01:00
parent 7693e3e666
commit f09f62f62c
11 changed files with 15 additions and 25 deletions

View File

@@ -70,7 +70,7 @@ use core::{
Index, IndexMut, RangeBounds,
},
ptr::{self, NonNull},
slice,
slice::{self, SliceIndex},
};
use crate::{
@@ -1672,10 +1672,7 @@ impl<T: Hash> Hash for Vec<T> {
message="vector indices are of type `usize` or ranges of `usize`",
label="vector indices are of type `usize` or ranges of `usize`",
)]
impl<T, I> Index<I> for Vec<T>
where
I: ::core::slice::SliceIndex<[T]>,
{
impl<T, I: SliceIndex<[T]>> Index<I> for Vec<T> {
type Output = I::Output;
#[inline]
@@ -1689,10 +1686,7 @@ where
message="vector indices are of type `usize` or ranges of `usize`",
label="vector indices are of type `usize` or ranges of `usize`",
)]
impl<T, I> IndexMut<I> for Vec<T>
where
I: ::core::slice::SliceIndex<[T]>,
{
impl<T, I: SliceIndex<[T]>> IndexMut<I> for Vec<T> {
#[inline]
fn index_mut(&mut self, index: I) -> &mut Self::Output {
IndexMut::index_mut(&mut **self, index)