[Feature Request] implement From<array literal> for Vec #67963
Labels
A-collections
Area: `std::collection`
C-feature-request
Category: A feature request, i.e: not implemented / a PR.
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
I would like the following code to compile:
The first call in main is hard to get right, since leaving out any part of the syntax gives confusing errors (without [..], gives
From<&&[u8; 2]>
is not satisfied, without & givesdoesn't have a size known at compile-time
).The second call seems to be the same idea, but doesn't compile since From isn't implemented for array literals.
This can be implemented without trouble on nightly Rust except for the orphan rule: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=21632f9784745afa98663d5e6e471cbb
If someone is willing to mentor I'm happy to turn that playground into a PR :)
The text was updated successfully, but these errors were encountered: