Rollup merge of #24866 - tshepang:vec-intro, r=steveklabnik
This commit is contained in:
commit
0c3514253c
1 changed files with 3 additions and 2 deletions
|
@ -1,8 +1,9 @@
|
|||
% Vectors
|
||||
|
||||
A ‘vector’ is a dynamic or ‘growable’ array, implemented as the standard
|
||||
library type [`Vec<T>`][vec]. That `<T>` is a [generic][generic], meaning we
|
||||
can have vectors of any type. Vectors always allocate their data on the heap.
|
||||
library type [`Vec<T>`][vec]. The `T` means that we can have vectors
|
||||
of any type (see the chapter on [generics][generic] for more).
|
||||
Vectors always allocate their data on the heap.
|
||||
You can create them with the `vec!` macro:
|
||||
|
||||
```rust
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue