-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Note that Vec<T> is heap allocated. #22305
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
@@ -49,8 +49,8 @@ languages. | |||
|
|||
A *vector* is a dynamic or "growable" array, implemented as the standard | |||
library type [`Vec<T>`](../std/vec/) (we'll talk about what the `<T>` means | |||
later). Vectors are to arrays what `String` is to `&str`. You can create them | |||
with the `vec!` macro: | |||
later). Vectors always allocate their data on the heap. Vectors are to arrays |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vectors are to slices, strictly speaking.
7f64d00
to
6d2e3d4
Compare
Just for the record, I'm going to note thestinger's objections to this terminology from #18226:
|
Fixes #20948