diff options
| author | William Woodruff <william@trailofbits.com> | 2020-12-11 10:09:40 -0500 |
|---|---|---|
| committer | William Woodruff <william@trailofbits.com> | 2020-12-11 10:09:40 -0500 |
| commit | d986924eb13a103fc79c474eded47a663c91bb7f (patch) | |
| tree | c700d0c817b2e197bc109683ecef7a2a7a2bfc6d /library/alloc/src | |
| parent | 9cf2516251c5379d3e8429342e8a392df81b9aaa (diff) | |
| download | rust-d986924eb13a103fc79c474eded47a663c91bb7f.tar.gz rust-d986924eb13a103fc79c474eded47a663c91bb7f.zip | |
doc: apply suggestions
Diffstat (limited to 'library/alloc/src')
| -rw-r--r-- | library/alloc/src/macros.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/library/alloc/src/macros.rs b/library/alloc/src/macros.rs index bbff1d3dc4d..7d4eff6185d 100644 --- a/library/alloc/src/macros.rs +++ b/library/alloc/src/macros.rs @@ -29,8 +29,9 @@ /// to the same boxed integer value, not five references pointing to independently /// boxed integers. /// -/// Also, note that `[T; 0]` is a valid initializer. This will initialize (or call) -/// `T` but not populate the vector with it, so be mindful of side effects. +/// Also, note that `vec![expr; 0]` is allowed, and produces an empty vector. +/// This will still evaluate `expr`, however, and immediately drop the resulting value, so +/// be mindful of side effects. /// /// [`Vec`]: crate::vec::Vec #[cfg(not(test))] |
