Janggun Lee
0369ccb532
Fix some grammar errors and hyperlinks in doc for trait Allocator
...
* "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-04-14 22:26:43 +09:00
Askar Safin
ac31e9572b
library: doc: core::alloc::Allocator: trivial typo fix
2025-02-07 09:14:17 +03:00
Marijn Schouten
52519e145e
Cleanup docs for Allocator
2025-01-29 20:15:49 +01:00
Nicholas Nethercote
84ac80f192
Reformat use declarations.
...
The previous commit updated `rustfmt.toml` appropriately. This commit is
the outcome of running `x fmt --all` with the new formatting options.
2024-07-29 08:26:52 +10:00
Amanieu d'Antras
8e9c8dd10a
Add information about allocation lifetime to Allocator::allocate
2024-02-13 14:12:51 +00:00
Amanieu d'Antras
fb5ed2986e
Clarify the lifetimes of allocations returned by the Allocator trait
...
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 {}
```
2024-02-12 14:02:30 +00:00
Nilstrieb
18c9baf4fe
Rollup merge of #107916 - reez12g:issue-107040, r=Amanieu
...
fix comment on Allocator trait
fixes https://github.com/rust-lang/rust/issues/107040
2023-05-30 12:57:38 +02:00
reez12g
000cd9b5fb
fix comment on Allocator trait
2023-05-30 13:56:57 +09:00
Deadbeef
76dbe29104
rm const traits in libcore
2023-04-16 06:49:27 +00:00
LegionMammal978
57e12f970c
Clarify that copied allocators must behave the same
2022-11-30 13:51:31 -05:00
Ralf Jung
d26659d611
clarify that realloc refreshes pointer provenance even when the allocation remains in-place
2022-11-18 10:43:40 +01:00
Pietro Albini
3975d55d98
remove cfg(bootstrap)
2022-09-26 10:14:45 +02:00
Deadbeef
31f259ce5a
Add const_trait to Allocator
2022-09-16 12:08:45 +08:00
Jane Losare-Lusby
bf7611d55e
Move error trait into core
2022-08-22 13:28:25 -07:00
CAD97
09dc24bc04
Remove potentially misleading realloc parenthetical
2022-05-14 22:30:14 -05:00
Jacob Pratt
4fbe73e0b7
Remove use of #[rustc_deprecated]
2022-04-14 01:33:13 -04:00
Autumn
e2466821ad
add notes about alignment-altering reallocs to Allocator docs
2022-03-31 16:13:19 -07:00
Frank Steffahn
8d2bb9389a
Consistent spelling of "adapter" in the standard library
...
Change all occurrences of "(A|a)daptor" to "(A|a)dapter".
2021-07-30 17:23:07 +02:00
Mara Bos
e077dffaec
Rollup merge of #81767 - exrook:layout-error-stability, r=Mark-Simulacrum
...
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-05 12:26:07 +01:00
Jacob Hughes
0c3a7d8b85
Update LayoutError/LayoutErr stability attributes
2021-02-04 19:02:57 -05:00
RustyYato
d06384ac29
make Allocator object-safe
...
add test to ensure object-safety
This allows for runtime polymorphic allocators
2021-02-03 20:46:16 -05:00
Tim Diekmann
9274b37d99
Rename AllocRef to Allocator and (de)alloc to (de)allocate
2020-12-04 14:47:15 +01:00
Mara Bos
5bbf75da78
Rollup merge of #77691 - exrook:rename-layouterr, r=KodrAus
...
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` 🥰
2020-11-16 17:26:17 +01:00
Jacob Hughes
8ff0c14dc5
Change layouterr deprecation message
2020-10-27 04:48:37 -04:00
Joshua Nelson
65835d1059
Deny broken intra-doc links in linkchecker
...
Since rustdoc isn't warning about these links, check for them manually.
2020-10-15 20:22:16 -04:00
Jacob Hughes
0266c134a7
Deprecate LayoutErr
2020-10-08 01:19:21 -04:00
Jacob Hughes
a97abb40ab
Rename LayoutErr to LayoutError in core
2020-10-08 00:39:18 -04:00
Dylan DPC
70740b1b82
Rollup merge of #77315 - exrook:rename-allocerror, r=joshtriplett
...
Rename AllocErr to AllocError
Implements rust-lang/wg-allocators#57
2020-10-01 02:13:39 +02:00
Jacob Hughes
5829560a68
Rename AllocErr to AllocError
2020-09-28 14:51:03 -04:00
Tim Diekmann
c22d896b9b
Change AllocRef::by_ref to take &self instead of &mut self
2020-09-28 10:42:29 +02:00
blitzerr
2b19b14cec
a few more &mut self -> self changes
2020-09-22 21:04:31 -07:00
blitzerr
3ffd403c6b
removing &mut self for other methods of AllocRef
2020-09-22 06:22:02 -07:00
blitzerr
d9d02fa168
Changing the alloc() to accept &self instead of &mut self
2020-09-21 16:43:36 -07:00
Tim Diekmann
438c40efa1
Allow reallocation to different alignment
2020-08-19 06:46:47 +02:00
Tim Diekmann
a9fe0ca47a
Clean up AllocRef implementation and documentation
2020-08-18 09:53:22 +02:00
Tim Diekmann
c619b36975
Remove fast path in reallocation for same layout sizes
2020-08-17 13:23:38 +02:00
Tim Diekmann
93d98328d1
Revert missing "memory block"
2020-08-04 19:24:08 +02:00
Tim Diekmann
929e37d4bf
Revert renaming of "memory block"
2020-08-04 19:15:48 +02:00
Tim Diekmann
ab9362ad9a
Replace Memoryblock with NonNull<[u8]>
2020-08-04 18:03:34 +02:00
Tim Diekmann
6395659168
Apply suggestions from code review
...
Co-authored-by: Amanieu d'Antras <amanieu@gmail.com>
2020-08-04 00:21:05 +02:00
Tim Diekmann
db7d07b83b
Remove a trailing whitespace
2020-08-01 21:53:00 +02:00
Tim Diekmann
9cd9286e20
Update doc-comment for grow_zeroed
2020-08-01 21:51:50 +02:00
Tim Diekmann
076ef66ba2
Remove in-place allocation and revert to separate methods for zeroed allocations
...
Fix docs
2020-07-28 12:41:18 +02:00
mark
2c31b45ae8
mv std libs to library/
2020-07-27 19:51:13 -05:00