diff options
| author | bors <bors@rust-lang.org> | 2020-02-03 18:40:54 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-02-03 18:40:54 +0000 |
| commit | 8417d68de5e063426ab6bb7f383df6117d1beeed (patch) | |
| tree | 46e8f409b07c23138be597bde715fe944f4274ce /src/liballoc | |
| parent | bdd946df3a7af6be0c075d5ab15f9845b3679364 (diff) | |
| parent | af3c315dafae5a40f4794635461625ab712d3582 (diff) | |
| download | rust-8417d68de5e063426ab6bb7f383df6117d1beeed.tar.gz rust-8417d68de5e063426ab6bb7f383df6117d1beeed.zip | |
Auto merge of #68803 - Dylan-DPC:rollup-b4x6ghj, r=Dylan-DPC
Rollup of 8 pull requests Successful merges: - #68678 (Install robots.txt into rust-docs tarballs) - #68711 (Added upper bound of what vecs and boxes can allocate) - #68744 (Do not ICE in `type-alias-impl-trait` with save-analysis) - #68777 (Clean up E0263 explanation) - #68787 (Optimize core::ptr::align_offset (part 1)) - #68797 (Fix links to types instead of modules) - #68798 (Test that `#[track_caller]` as `fn()` respects RT / CTFE equivalence) - #68800 (Stabilize `core::iter::once_with()`) Failed merges: r? @ghost
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/boxed.rs | 3 | ||||
| -rw-r--r-- | src/liballoc/vec.rs | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs index 8735c2c8f36..7e5efbe3078 100644 --- a/src/liballoc/boxed.rs +++ b/src/liballoc/boxed.rs @@ -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 //! diff --git a/src/liballoc/vec.rs b/src/liballoc/vec.rs index 26a7812f58e..4f6b7870e2e 100644 --- a/src/liballoc/vec.rs +++ b/src/liballoc/vec.rs @@ -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`]: |
