Rollup merge of #68711 - hman523:fix-68593, r=Dylan-DPC
Added upper bound of what vecs and boxes can allocate Fixed issue #68593 I added a line of documentation to these two files to reflect that vectors and boxes ensure that they never allocate more than `isize::MAX` bytes. r? @steveklabnik
This commit is contained in:
commit
5e561c2135
@ -2,7 +2,8 @@
|
||||
//!
|
||||
//! [`Box<T>`], casually referred to as a 'box', provides the simplest form of
|
||||
//! heap allocation in Rust. Boxes provide ownership for this allocation, and
|
||||
//! drop their contents when they go out of scope.
|
||||
//! drop their contents when they go out of scope. Boxes also ensure that they
|
||||
//! never allocate more than `isize::MAX` bytes.
|
||||
//!
|
||||
//! # Examples
|
||||
//!
|
||||
|
@ -4,6 +4,8 @@
|
||||
//! Vectors have `O(1)` indexing, amortized `O(1)` push (to the end) and
|
||||
//! `O(1)` pop (from the end).
|
||||
//!
|
||||
//! Vectors ensure they never allocate more than `isize::MAX` bytes.
|
||||
//!
|
||||
//! # Examples
|
||||
//!
|
||||
//! You can explicitly create a [`Vec<T>`] with [`new`]:
|
||||
|
Loading…
Reference in New Issue
Block a user