-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Tracking issue: Add back Vec::from_elem
(RFC 832)
#22414
Comments
Super easy to implement for anyone interested. The implementation in the RFC is sound, although the new code should be abstracted out into a function that the macro calls for inline and macro-sanity reasons. The function needs to be marked as public/stable, but should otherwise be marked as #[doc(hidden)], as it is not intended to be called directly -- only by the macro. |
Willing to mentor on details. |
I'd like to give it a shot :) |
By the way: The documentation for |
Yeah, that's totally reasonable to do at the same time! |
Great! What would be the preferred place where to put the new function? I've added it to |
Since it's supposed to only be used by the |
vec.rs has a section labeled "Internal methods and functions" that seemed to fit well. |
Implement `Vec::from_elem` by making the `vec![element; len]` macro more powerful (see RFC 832). Closes rust-lang#22414
Implement `Vec::from_elem` by making the `vec![element; len]` macro more powerful (see rust-lang/rfcs#832). Closes rust-lang#22414 r? @gankro
rust-lang/rfcs#832
The text was updated successfully, but these errors were encountered: