diff options
| author | Andrey Zgarbul <zgarbul.andrey@gmail.com> | 2020-07-04 13:30:09 +0300 |
|---|---|---|
| committer | Andrey Zgarbul <zgarbul.andrey@gmail.com> | 2020-07-04 13:30:09 +0300 |
| commit | 7d4a92d4f8dc03409984695d78893fffdd3ff1f9 (patch) | |
| tree | a9d9e8e836fedfb4f4927eeffcf979863da1b11e | |
| parent | f844ea1e561475e6023282ef167e76bc973773ef (diff) | |
| download | rust-7d4a92d4f8dc03409984695d78893fffdd3ff1f9.tar.gz rust-7d4a92d4f8dc03409984695d78893fffdd3ff1f9.zip | |
remove LengthAtMost32 on AsRef/Borrow impl for array
| -rw-r--r-- | src/libcore/array/mod.rs | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/src/libcore/array/mod.rs b/src/libcore/array/mod.rs index 549228ffffa..bf4c3d8a057 100644 --- a/src/libcore/array/mod.rs +++ b/src/libcore/array/mod.rs @@ -92,10 +92,7 @@ impl From<Infallible> for TryFromSliceError { } #[stable(feature = "rust1", since = "1.0.0")] -impl<T, const N: usize> AsRef<[T]> for [T; N] -where - [T; N]: LengthAtMost32, -{ +impl<T, const N: usize> AsRef<[T]> for [T; N] { #[inline] fn as_ref(&self) -> &[T] { &self[..] @@ -103,10 +100,7 @@ where } #[stable(feature = "rust1", since = "1.0.0")] -impl<T, const N: usize> AsMut<[T]> for [T; N] -where - [T; N]: LengthAtMost32, -{ +impl<T, const N: usize> AsMut<[T]> for [T; N] { #[inline] fn as_mut(&mut self) -> &mut [T] { &mut self[..] @@ -114,20 +108,14 @@ where } #[stable(feature = "array_borrow", since = "1.4.0")] -impl<T, const N: usize> Borrow<[T]> for [T; N] -where - [T; N]: LengthAtMost32, -{ +impl<T, const N: usize> Borrow<[T]> for [T; N] { fn borrow(&self) -> &[T] { self } } #[stable(feature = "array_borrow", since = "1.4.0")] -impl<T, const N: usize> BorrowMut<[T]> for [T; N] -where - [T; N]: LengthAtMost32, -{ +impl<T, const N: usize> BorrowMut<[T]> for [T; N] { fn borrow_mut(&mut self) -> &mut [T] { self } |
