diff options
| author | kennytm <kennytm@gmail.com> | 2018-03-28 17:55:20 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-03-28 17:55:20 +0200 |
| commit | 30560bb99a8875560bbad9030715520b8300110c (patch) | |
| tree | 5b756bbdb3cf0a4411b20c8b26e7e146a130d2d3 /src/liballoc | |
| parent | 03de75e7c63df2f36e272596b0f18fd7a1bfbe83 (diff) | |
| parent | 0d15a3ee5402284450c312318871971f41603f80 (diff) | |
| download | rust-30560bb99a8875560bbad9030715520b8300110c.tar.gz rust-30560bb99a8875560bbad9030715520b8300110c.zip | |
Rollup merge of #49452 - frewsxcv:frewsxcv-vec-cap-len, r=dtolnay
Clarify "length" wording in `Vec::with_capacity`. Fixes https://github.com/rust-lang/rust/issues/49448.
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/vec.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/liballoc/vec.rs b/src/liballoc/vec.rs index c9c6cf1cb66..bcc999d7386 100644 --- a/src/liballoc/vec.rs +++ b/src/liballoc/vec.rs @@ -334,9 +334,10 @@ impl<T> Vec<T> { /// The vector will be able to hold exactly `capacity` elements without /// reallocating. If `capacity` is 0, the vector will not allocate. /// - /// It is important to note that this function does not specify the *length* - /// of the returned vector, but only the *capacity*. For an explanation of - /// the difference between length and capacity, see *[Capacity and reallocation]*. + /// It is important to note that although the returned vector has the + /// *capacity* specified, the vector will have a zero *length*. For an + /// explanation of the difference between length and capacity, see + /// *[Capacity and reallocation]*. /// /// [Capacity and reallocation]: #capacity-and-reallocation /// |
