Skip to content

Commit

Permalink
Note that Vec<T> is heap allocated.
Browse files Browse the repository at this point in the history
Fixes #20948
  • Loading branch information
steveklabnik committed Feb 13, 2015
1 parent cf636c2 commit 6d2e3d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/doc/trpl/arrays-vectors-and-slices.md
Expand Up @@ -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>
Expand Down

0 comments on commit 6d2e3d4

Please sign in to comment.