-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Tricky to construct a dynamically sized ~[T] #13658
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
Comments
We have yet to provide a convenient conversion from let foo: ~[T] = Vec::from_elem(n, e).insert_method_name_here(); Currently |
Even assuming proper conversion from |
The |
It's tricky to construct a dynamically sized |
With the removal of
~[T]
vector building functions by #13588, it is now very difficult to construct~[T]
with a size known at runtime. Currently I opted for this replacement ofstd::slice::from_elem
:but it is unclear to me if this workaround is not merely an oversight. Is the intention to make dynamically sized
~[T]
impossible to construct?The text was updated successfully, but these errors were encountered: