Skip to content

Commit

Permalink
Unrolled build for rust-lang#126266
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#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 rust-lang#125870.
  • Loading branch information
rust-timer authored Jun 14, 2024
2 parents 63491e1 + bb8eb44 commit a3a9f3a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion library/std/src/alloc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a3a9f3a

Please sign in to comment.