diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-06-14 12:23:37 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-14 12:23:37 +0200 |
| commit | e923048768f5a9dca19e2106e23c65b29c3965a8 (patch) | |
| tree | 68809501dea0cdcdbb11085aac1fcd175fc8464d | |
| parent | 6396d4c846a0bc77b4c464104fd5d2f772929955 (diff) | |
| parent | bb8eb44511d24b6081c15dbada56f80813d99a4c (diff) | |
Rollup merge of #126266 - tbu-:pr_doc_alloc_default_system, r=jhpratt
Unify guarantees about the default allocator `std::alloc` said that the default allocator is unspecified for all crrate types except `cdylib` and `staticlib`. Adjust `std::alloc::System` documentation to say the same. Fixes #125870.
| -rw-r--r-- | library/std/src/alloc.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/library/std/src/alloc.rs b/library/std/src/alloc.rs index b98fbbf762f..dc4924cdf58 100644 --- a/library/std/src/alloc.rs +++ b/library/std/src/alloc.rs @@ -73,7 +73,9 @@ pub use alloc_crate::alloc::*; /// work, such as to serve alignment requests greater than the alignment /// provided directly by the backing system allocator. /// -/// This type implements the `GlobalAlloc` trait and Rust programs by default +/// This type implements the [`GlobalAlloc`] trait. Currently the default +/// global allocator is unspecified. Libraries, however, like `cdylib`s and +/// `staticlib`s are guaranteed to use the [`System`] by default and as such /// work as if they had this definition: /// /// ```rust |
