-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Borrow Vec<T, A> as [T] #99317
Borrow Vec<T, A> as [T] #99317
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Mark-Simulacrum (or someone else) soon. Please see the contribution instructions for more information. |
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
This seems okay to me, and I think isn't a stable API change (since Allocator is an unstable trait), so going to go ahead and r+ directly. @bors r+ |
…askrgr Rollup of 10 pull requests Successful merges: - rust-lang#98582 (Allow destructuring opaque types in their defining scopes) - rust-lang#99213 (migrate some of `rustc_passes::check_attr`'s diagnostics and derive improvements) - rust-lang#99258 (Provide structured suggestion for dropped temp value) - rust-lang#99259 (interpret/visitor: support visiting with a PlaceTy) - rust-lang#99287 ([rustdoc-json] JSON no longer inlines) - rust-lang#99290 (Revert "Highlight conflicting param-env candidates") - rust-lang#99316 (docs: add missing word) - rust-lang#99317 (Borrow Vec<T, A> as [T]) - rust-lang#99323 (Fix flakyness of GUI tests) - rust-lang#99342 (Avoid some `Symbol` to `String` conversions) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Hello all,
When
Vec
was parametrized withA
, theBorrow
impls were omitted and currentlyVec<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: rust-lang/wg-allocators#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.