about summary refs log tree commit diff
path: root/library/alloc/src/vec/mod.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-04-08 22:51:10 +0000
committerbors <bors@rust-lang.org>2025-04-08 22:51:10 +0000
commitde5b8a4c77618d8ae8e8ea0e4b787917c32e9305 (patch)
treee4749c89ec0510c575525fdfbfdad43f2775a8ff /library/alloc/src/vec/mod.rs
parentd4f880f8ce832cd7560bb2f1ebc34f967055ffd7 (diff)
parent1cbf8b56afa6262c48d929b3b369d114c37f4124 (diff)
Auto merge of #139536 - matthiaskrgr:rollup-j6goald, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #139476 (rm `RegionInferenceContext::var_infos`)
 - #139485 (compiletest: Stricter parsing for diagnostic kinds)
 - #139491 (Update books)
 - #139500 (document panic behavior of Vec::resize and Vec::resize_with)
 - #139501 (Fix stack overflow in exhaustiveness due to recursive HIR opaque hidden types)
 - #139504 (add missing word in doc comment)
 - #139509 (clean: remove Deref<Target=RegionKind> impl for Region and use `.kind()`)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'library/alloc/src/vec/mod.rs')
-rw-r--r--library/alloc/src/vec/mod.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/library/alloc/src/vec/mod.rs b/library/alloc/src/vec/mod.rs
index 633ef717e04..e6867febf6c 100644
--- a/library/alloc/src/vec/mod.rs
+++ b/library/alloc/src/vec/mod.rs
@@ -2803,6 +2803,10 @@ impl<T, A: Allocator> Vec<T, A> {
     /// want to use the [`Default`] trait to generate values, you can
     /// pass [`Default::default`] as the second argument.
     ///
+    /// # Panics
+    ///
+    /// Panics if the new capacity exceeds `isize::MAX` _bytes_.
+    ///
     /// # Examples
     ///
     /// ```
@@ -3010,6 +3014,10 @@ impl<T: Clone, A: Allocator> Vec<T, A> {
     /// [`Clone`]), use [`Vec::resize_with`].
     /// If you only need to resize to a smaller size, use [`Vec::truncate`].
     ///
+    /// # Panics
+    ///
+    /// Panics if the new capacity exceeds `isize::MAX` _bytes_.
+    ///
     /// # Examples
     ///
     /// ```