Skip to content

Commit

Permalink
Rollup merge of #48286 - SergioBenitez:master, r=BurntSushi
Browse files Browse the repository at this point in the history
Clarify contiguity of Vec's elements.

Small doc changes for clarity.
  • Loading branch information
GuillaumeGomez authored Feb 17, 2018
2 parents c4f0011 + 22aecb9 commit 47db61a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/liballoc/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,9 @@ use Bound::{Excluded, Included, Unbounded};
///
/// If a `Vec` *has* allocated memory, then the memory it points to is on the heap
/// (as defined by the allocator Rust is configured to use by default), and its
/// pointer points to [`len`] initialized elements in order (what you would see
/// if you coerced it to a slice), followed by [`capacity`]` - `[`len`]
/// logically uninitialized elements.
/// pointer points to [`len`] initialized, contiguous elements in order (what
/// you would see if you coerced it to a slice), followed by [`capacity`]` -
/// `[`len`] logically uninitialized, contiguous elements.
///
/// `Vec` will never perform a "small optimization" where elements are actually
/// stored on the stack for two reasons:
Expand Down Expand Up @@ -281,8 +281,8 @@ use Bound::{Excluded, Included, Unbounded};
/// not break, however: using `unsafe` code to write to the excess capacity,
/// and then increasing the length to match, is always valid.
///
/// `Vec` does not currently guarantee the order in which elements are dropped
/// (the order has changed in the past, and may change again).
/// `Vec` does not currently guarantee the order in which elements are dropped.
/// The order has changed in the past and may change again.
///
/// [`vec!`]: ../../std/macro.vec.html
/// [`Index`]: ../../std/ops/trait.Index.html
Expand Down

0 comments on commit 47db61a

Please sign in to comment.