Oli Scherer
714feab059
Update library/core/src/alloc/mod.rs
...
Co-authored-by: Ralf Jung <post@ralfj.de>
2020-12-26 18:06:04 +01:00
Oli Scherer
48c8ff59ec
Update library/core/src/alloc/global.rs
...
Co-authored-by: Ralf Jung <post@ralfj.de>
2020-12-26 18:05:55 +01:00
Tomasz Miąsko
cf5bd26329
Describe why size_align have not been inlined so far
2020-12-10 00:00:00 +00:00
oli
fda4c8d5c1
Update documentation to review comments
2020-12-04 17:28:22 +00:00
Tim Diekmann
9274b37d99
Rename AllocRef to Allocator and (de)alloc to (de)allocate
2020-12-04 14:47:15 +01:00
Chris Denton
9050d12714
Stabilize alloc::Layout const functions
...
Stabilizes #67521 . In particular the following stable methods are stabilized as const fn:
* size
* align
* from_size_align
2020-11-22 21:43:30 +00:00
oli
58d62b8371
Inform tidy about the reason for the ignored rust code
2020-11-19 14:57:30 +00:00
oli
dfca61a4c2
Elaborate on side effects
2020-11-19 14:28:28 +00:00
oli
3d1f676906
Fix tidy
2020-11-19 11:41:47 +00:00
oli
173892c776
Note that there are other optimizations than the one showcased
2020-11-19 11:09:10 +00:00
oli
a2f938ac52
Document that heap allocations are not guaranteed to happen, even if explicitly performed in the code
2020-11-19 11:05:15 +00: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
Dylan DPC
a40d79c9fb
Rollup merge of #76993 - blitzerr:alloc-ref, r=Amanieu
...
Changing the alloc() to accept &self instead of &mut self
Fixes: [#55 ](https://github.com/rust-lang/wg-allocators/issues/55 )
This is the first cut. It only makes the change for `alloc` method.
2020-09-23 14:54:06 +02:00
blitzerr
2b19b14cec
a few more &mut self -> self changes
2020-09-22 21:04:31 -07:00
Dylan MacKenzie
110e59e70e
Update library functions with stability attributes
...
This may not be strictly minimal, but all unstable functions also need a
`rustc_const_unstable` attribute.
2020-09-22 10:05:58 -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
bors
ffd59bf9c6
Auto merge of #75687 - TimDiekmann:realloc-align, r=Amanieu
...
Allow reallocation to different alignment in `AllocRef`
The allocator-wg [has decided](https://github.com/rust-lang/wg-allocators/issues/5#issuecomment-672591112 ) to support reallocating to a different alignment in `AllocRef`. For more details please see the linked issue.
r? @Amanieu
closes https://github.com/rust-lang/wg-allocators/issues/5
2020-08-26 10:44:28 +00:00
Denis Vasilik
2500b6df14
Link to primitive instead of module
2020-08-22 12:16:03 +02:00
Denis Vasilik
9785fd0882
Use intra-doc links
2020-08-21 21:41:43 +02:00
Denis Vasilik
a45d90ec23
Use intra-doc links
2020-08-21 21:35:52 +02: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