impl const Default for Box<[T]> and Box<str>#95947
Conversation
|
Thank you for submitting a new PR for the library teams! If this PR contains a stabilization of a library feature that has not already completed FCP in its tracking issue, introduces new or changes existing unstable library APIs, or changes our public documentation in ways that create new stability guarantees then please comment with |
|
r? @m-ou-se (rust-highfive has picked a reviewer for you, use r? to override) |
|
r? rust-lang/libs-api @rustbot label +T-libs-api |
|
@bors r+ |
|
📌 Commit 2d5eda8 has been approved by |
Rollup of 5 pull requests Successful merges: - rust-lang#95671 (feat: Allow usage of sudo [while not accessing root] in x.py) - rust-lang#95716 (sess: warn w/out fluent bundle w/ user sysroot) - rust-lang#95820 (simplify const params diagnostic on stable) - rust-lang#95900 (Fix documentation for wasm32-unknown-unknown) - rust-lang#95947 (`impl const Default for Box<[T]>` and `Box<str>`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
The unstable
const_default_impls(#87864) already include emptyVec<T>andString. Now we extend that concept toBox<[T]>andBox<str>as well.This obviates a hack in
rustc_ast'sP::<[T]>::new.