about summary refs log tree commit diff
path: root/library/core/src/alloc/mod.rs
AgeCommit message (Collapse)AuthorLines
2025-04-14Fix some grammar errors and hyperlinks in doc for `trait Allocator`Janggun Lee-2/+4
* "while until either" could also be changed to "for a while until either", but I just deleted "while". * fixed sentence with incorrect "at" and "has/have". * linked [*currently allocated*] similar to other methods.
2025-02-07library: doc: core::alloc::Allocator: trivial typo fixAskar Safin-1/+1
2025-01-29Cleanup docs for AllocatorMarijn Schouten-31/+27
2024-07-29Reformat `use` declarations.Nicholas Nethercote-2/+0
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-02-13Add information about allocation lifetime to Allocator::allocateAmanieu d'Antras-0/+4
2024-02-12Clarify the lifetimes of allocations returned by the `Allocator` traitAmanieu d'Antras-2/+4
The previous definition (accidentally) disallowed the implementation of stack-based allocators whose memory would become invalid once the lifetime of the allocator type ended. This also ensures the validity of the following blanket implementation: ```rust impl<A: Allocator> Allocator for &'_ A {} ```
2023-05-30Rollup merge of #107916 - reez12g:issue-107040, r=AmanieuNilstrieb-2/+3
fix comment on Allocator trait fixes https://github.com/rust-lang/rust/issues/107040
2023-05-30fix comment on Allocator traitreez12g-2/+3
2023-04-16rm const traits in libcoreDeadbeef-1/+0
2022-11-30Clarify that copied allocators must behave the sameLegionMammal978-3/+3
2022-11-18clarify that realloc refreshes pointer provenance even when the allocation ↵Ralf Jung-4/+6
remains in-place
2022-09-26remove cfg(bootstrap)Pietro Albini-2/+0
2022-09-16Add `const_trait` to `Allocator`Deadbeef-0/+1
2022-08-22Move error trait into coreJane Losare-Lusby-0/+10
2022-05-14Remove potentially misleading realloc parentheticalCAD97-4/+2
2022-04-14Remove use of `#[rustc_deprecated]`Jacob Pratt-2/+2
2022-03-31add notes about alignment-altering reallocs to Allocator docsAutumn-0/+6
2021-07-30Consistent spelling of "adapter" in the standard libraryFrank Steffahn-2/+2
Change all occurrences of "(A|a)daptor" to "(A|a)dapter".
2021-02-05Rollup merge of #81767 - exrook:layout-error-stability, r=Mark-SimulacrumMara Bos-2/+2
Update LayoutError/LayoutErr stability attributes `LayoutError` ended up not making it into 1.49.0, updating the stability attributes to reflect that. I also pushed `LayoutErr` deprecation back a release to allow 2 releases before the deprecation comes into effect. This change should be backported to beta.
2021-02-04Update LayoutError/LayoutErr stability attributesJacob Hughes-2/+2
2021-02-03make Allocator object-safeRustyYato-1/+4
add test to ensure object-safety This allows for runtime polymorphic allocators
2020-12-04 Rename `AllocRef` to `Allocator` and `(de)alloc` to `(de)allocate`Tim Diekmann-32/+32
2020-11-16Rollup merge of #77691 - exrook:rename-layouterr, r=KodrAusMara Bos-1/+12
Rename/Deprecate LayoutErr in favor of LayoutError Implements rust-lang/wg-allocators#73. This patch renames LayoutErr to LayoutError, and uses a type alias to support users using the old name. The new name will be instantly stable in release 1.49 (current nightly), the type alias will become deprecated in release 1.51 (so that when the current nightly is 1.51, 1.49 will be stable). This is the only error type in `std` that ends in `Err` rather than `Error`, if this PR lands all stdlib error types will end in `Error` :smiling_face_with_three_hearts:
2020-10-27Change layouterr deprecation messageJacob Hughes-1/+1
2020-10-15Deny broken intra-doc links in linkcheckerJoshua Nelson-9/+3
Since rustdoc isn't warning about these links, check for them manually.
2020-10-08Deprecate LayoutErrJacob Hughes-1/+9
2020-10-08Rename LayoutErr to LayoutError in coreJacob Hughes-0/+3
2020-10-01Rollup merge of #77315 - exrook:rename-allocerror, r=joshtriplettDylan DPC-13/+13
Rename AllocErr to AllocError Implements rust-lang/wg-allocators#57
2020-09-28Rename AllocErr to AllocErrorJacob Hughes-13/+13
2020-09-28Change `AllocRef::by_ref` to take `&self` instead of `&mut self`Tim Diekmann-1/+1
2020-09-22a few more &mut self -> self changesblitzerr-8/+8
2020-09-22removing &mut self for other methods of AllocRefblitzerr-4/+4
2020-09-21Changing the alloc() to accept &self instead of &mut selfblitzerr-2/+2
2020-08-19Allow reallocation to different alignmentTim Diekmann-79/+61
2020-08-18Clean up AllocRef implementation and documentationTim Diekmann-29/+29
2020-08-17Remove fast path in reallocation for same layout sizesTim Diekmann-18/+0
2020-08-04Revert missing "memory block"Tim Diekmann-1/+1
2020-08-04Revert renaming of "memory block"Tim Diekmann-22/+22
2020-08-04Replace `Memoryblock` with `NonNull<[u8]>`Tim Diekmann-72/+68
2020-08-04Apply suggestions from code reviewTim Diekmann-6/+5
Co-authored-by: Amanieu d'Antras <amanieu@gmail.com>
2020-08-01Remove a trailing whitespaceTim Diekmann-1/+1
2020-08-01Update doc-comment for grow_zeroedTim Diekmann-2/+7
2020-07-28Remove in-place allocation and revert to separate methods for zeroed allocationsTim Diekmann-174/+162
Fix docs
2020-07-27mv std libs to library/mark-0/+446