Note that Vec<T> is heap allocated.

Fixes #20948
This commit is contained in:
Steve Klabnik 2015-02-13 17:52:46 -05:00
parent cf636c233d
commit 6d2e3d4bc0

View File

@ -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 slices
what `String` is to `&str`. You can create them with the `vec!` macro:
```{rust}
let v = vec![1, 2, 3]; // v: Vec<i32>