rust/library/alloc/src
bors 996ff2e0a0 Auto merge of #87408 - kornelski:try_reserve_error, r=yaahc
Hide allocator details from TryReserveError

I think there's [no need for TryReserveError to carry detailed information](https://github.com/rust-lang/rust/issues/48043#issuecomment-825139280), but I wouldn't want that issue to delay stabilization of the `try_reserve` feature.

So I'm proposing to stabilize `try_reserve` with a `TryReserveError` as an opaque structure, and if needed, expose error details later.

This PR moves the `enum` to an unstable inner `TryReserveErrorKind` that lives under a separate feature flag. `TryReserveErrorKind` could possibly be left as an implementation detail forever, and the `TryReserveError` get methods such as `allocation_size() -> Option<usize>` or `layout() -> Option<Layout>` instead, or the details could be dropped completely to make try-reserve errors just a unit struct, and thus smaller and cheaper.
2021-08-07 01:26:15 +00:00
..
alloc Rename AllocRef to Allocator and (de)alloc to (de)allocate 2020-12-04 14:47:15 +01:00
collections Auto merge of #87408 - kornelski:try_reserve_error, r=yaahc 2021-08-07 01:26:15 +00:00
prelude mv std libs to library/ 2020-07-27 19:51:13 -05:00
raw_vec Rename AllocRef to Allocator and (de)alloc to (de)allocate 2020-12-04 14:47:15 +01:00
rc Re-stabilize Weak::as_ptr &friends for unsized T 2021-01-06 19:30:22 -05:00
sync Rollup merge of #80764 - CAD97:weak-unsized-as-ptr-again, r=RalfJung 2021-01-16 17:29:56 +00:00
vec alloc: Use intra doc links for the reserve function 2021-08-05 04:23:54 +02:00
alloc.rs alloc: Add unstable Cfg feature no-global_oom_handling 2021-05-05 16:49:04 -04:00
borrow.rs Added diagnostic items to structs and traits for Clippy 2021-07-15 23:57:02 +02:00
boxed.rs add Box::try_new_uninit_slice for symmetry 2021-08-05 21:21:52 +02:00
fmt.rs Fix may not to appropriate might not or must not 2021-07-29 01:15:20 -04:00
lib.rs Relocate Arc and Rc UnwindSafe impls 2021-07-31 03:57:49 -07:00
macros.rs Remove alloc/malloc/calloc/realloc doc aliases 2021-06-30 19:59:39 +01:00
raw_vec.rs Hide allocator details from TryReserveError 2021-07-24 22:25:08 +01:00
rc.rs Relocate Arc and Rc UnwindSafe impls 2021-07-31 03:57:49 -07:00
slice.rs Use HTTPS links where possible 2021-06-23 16:26:46 -04:00
str.rs Use HTTPS links where possible 2021-06-23 16:26:46 -04:00
string.rs alloc: Use intra doc links for the reserve function 2021-08-05 04:23:54 +02:00
sync.rs Relocate Arc and Rc UnwindSafe impls 2021-07-31 03:57:49 -07:00
task.rs Document From implementations for Waker and RawWaker 2021-04-22 14:16:33 -07:00
tests.rs Fix alloc::test::test_show 2021-04-21 15:45:41 +02:00