diff options
| author | bors <bors@rust-lang.org> | 2021-10-11 14:16:15 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-10-11 14:16:15 +0000 |
| commit | 1067e2ca5e9cfe5c79f956e49ffc684c5142d49b (patch) | |
| tree | e5f2a3b0156efd5a28e933c42629ce4b443f0b9a /library/alloc/src/vec | |
| parent | 6ae8912a3e7d2c4c775024f58a7ba4b1aedc4073 (diff) | |
| parent | 913b1de0ec1da8cdf5e8ad1c418fe4ad61e1e79d (diff) | |
| download | rust-1067e2ca5e9cfe5c79f956e49ffc684c5142d49b.tar.gz rust-1067e2ca5e9cfe5c79f956e49ffc684c5142d49b.zip | |
Auto merge of #89767 - GuillaumeGomez:rollup-sczixhk, r=GuillaumeGomez
Rollup of 7 pull requests Successful merges: - #89655 (bootstrap: don't use `--merges` to look for commit hashes for downloading artifacts) - #89726 (Add #[must_use] to alloc constructors) - #89729 (Add #[must_use] to core and std constructors) - #89743 (Fix RUSTC_LOG handling) - #89753 (Add #[must_use] to from_value conversions) - #89754 (Cleanup .item-table CSS) - #89761 (:arrow_up: rust-analyzer) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'library/alloc/src/vec')
| -rw-r--r-- | library/alloc/src/vec/mod.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/library/alloc/src/vec/mod.rs b/library/alloc/src/vec/mod.rs index 4f18a054a0d..a12acb1a1c0 100644 --- a/library/alloc/src/vec/mod.rs +++ b/library/alloc/src/vec/mod.rs @@ -420,6 +420,7 @@ impl<T> Vec<T> { #[inline] #[rustc_const_stable(feature = "const_vec_new", since = "1.39.0")] #[stable(feature = "rust1", since = "1.0.0")] + #[must_use] pub const fn new() -> Self { Vec { buf: RawVec::NEW, len: 0 } } @@ -464,6 +465,7 @@ impl<T> Vec<T> { #[cfg(not(no_global_oom_handling))] #[inline] #[stable(feature = "rust1", since = "1.0.0")] + #[must_use] pub fn with_capacity(capacity: usize) -> Self { Self::with_capacity_in(capacity, Global) } |
