rust/library/alloc
Matthias Krüger ddc32d1633
Rollup merge of #99317 - yanchith:borrow-vec-ta-as-slice-t, r=Mark-Simulacrum
Borrow Vec<T, A> as [T]

Hello all,

When `Vec` was parametrized with `A`, the `Borrow` impls were omitted and currently `Vec<T, A>` can't be borrowed as `[T]`. This PR fixes that.

This was probably missed, because the `Borrow` impls are in a different file - `src/alloc/slice.rs`.

We briefly discussed this here: https://github.com/rust-lang/wg-allocators/issues/96 and I was told to go ahead and make a PR :)

I tested this by building the toolchain and building my code that needed the `Borrow` impl against it, but let me know if I should add any tests to this PR.
2022-07-16 22:30:54 +02:00
..
benches Add VecDeque::extend TrustedLen benchmark 2022-06-17 23:41:03 +02:00
src Rollup merge of #99317 - yanchith:borrow-vec-ta-as-slice-t, r=Mark-Simulacrum 2022-07-16 22:30:54 +02:00
tests Stabilize core::ffi::CStr, alloc::ffi::CString, and friends 2022-07-15 03:10:35 -07:00
Cargo.toml Switch all libraries to the 2021 edition 2021-12-23 19:03:47 +08:00