Skip to content

Commit aeb9497

Browse files
committed
Borrow Vec<T, A> as [T]
1 parent e6c43cf commit aeb9497

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/alloc/src/slice.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -836,14 +836,14 @@ impl<T: Clone, V: Borrow<[T]>> Join<&[T]> for [V] {
836836
////////////////////////////////////////////////////////////////////////////////
837837

838838
#[stable(feature = "rust1", since = "1.0.0")]
839-
impl<T> Borrow<[T]> for Vec<T> {
839+
impl<T, A: Allocator> Borrow<[T]> for Vec<T, A> {
840840
fn borrow(&self) -> &[T] {
841841
&self[..]
842842
}
843843
}
844844

845845
#[stable(feature = "rust1", since = "1.0.0")]
846-
impl<T> BorrowMut<[T]> for Vec<T> {
846+
impl<T, A: Allocator> BorrowMut<[T]> for Vec<T, A> {
847847
fn borrow_mut(&mut self) -> &mut [T] {
848848
&mut self[..]
849849
}

0 commit comments

Comments
 (0)