Assorted allocator nitpicks - #161115
Conversation
|
r=me minus const bound note. (either remove unused const bound on both, or constify both) |
|
New changes look good too, but will hold merge in case you have anything else to add. (r=me) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@bors r=clarfonthey rollup |
|
forgot to squash, oopers @bors r- |
|
This pull request was unapproved. |
|
@bors squash |
|
🚧 Squashing... this can take a few minutes. |
|
❗ Failed to push the squashed commit to |
ref mut const unstable matching ref vec, vecdeque: rename alloc to allocator staticallocator on ref mut as well wording will be the death of me words order words random word words random good eeeeeeeeeeeee oh yeah these need the bound
cc3398f to
1724501
Compare
|
I can see someone wants to get this merged 😂 |
|
i also added the AllocatorClone bound to the conversion from |
|
Probably don't do that, you can write that downstream for |
|
yep. though im okay keeping it so you can create an |
|
I don't think you can call that impl for allocators other than global? I'll do more testing around fundamental in general before stabilization because I feel like there's some weird stuff here |
|
we want to eventually offer |
|
If you can call that, that's already problematic because we also want to change the |
|
|
| /// allocated memory. | ||
| /// `Allocator` is mostly designed to be implemented on ZSTs, references, or smart pointers, | ||
| /// but can also be implemented directly on the underlying memory-owning type so long as it | ||
| /// upholds the necessary guarantees. In general, an allocator for `MyAlloc([u8; N])` cannot be |
There was a problem hiding this comment.
| /// upholds the necessary guarantees. In general, an allocator for `MyAlloc([u8; N])` cannot be | |
| /// upholds the necessary guarantees. In general, an allocator `MyAlloc([u8; N])` cannot be |
There was a problem hiding this comment.
Actually, maybe it's better to just say you can't have an allocator like this realistically and say "it needs to be more complicated than e.g. MyAlloc([u8; N])
|
ready on my end, feel free to r+ this once you've reviewed clar ^ |
|
@bors r+ rollup Looked through all remaining comments, everything looks to be resolved. |
…nthey Assorted allocator nitpicks Small things that got missed in rust-lang#157428, doc language cleanup for allocator, and a rename that closes rust-lang#158344. cc @rust-lang/wg-allocators. pending libs bikeshed decision on the naming of `into_raw_parts_with_alloc` r? clarfonthey
…nthey Assorted allocator nitpicks Small things that got missed in rust-lang#157428, doc language cleanup for allocator, and a rename that closes rust-lang#158344. cc @rust-lang/wg-allocators. pending libs bikeshed decision on the naming of `into_raw_parts_with_alloc` r? clarfonthey
Rollup of 18 pull requests Successful merges: - #154210 (fix: fix the capture behavior of `if let` in closures) - #156176 (Initial implementation of `FnPtr` trait) - #160767 (Unify E0117 foreign-trait label for ADT/primitive types with existing Slice/Array/Tuple handling) - #161297 (std: use UNIX's `Instant` and `SystemTime` on Hermit) - #160489 (Adding diagnostic item markers for multiple fs functions and structs) - #160643 (Require windowed (and exception) for Xtensa ABI) - #161088 (suppress projection errors already covered by a trait error) - #161114 (Remove fields from TypeKind: Struct, Enum, Union and Tuple) - #161115 (Assorted allocator nitpicks) - #161220 (bootstrap: Allow `./x fix --allow-dirty`) - #161296 (Enable overflow checks in `rustc_thread_pool`) - #161298 (remove rustc_error_messages dependency) - #161304 (Rename test so it matches the issue) - #161309 (`allow(non_camel_case_types)` in `minicore.rs`) - #161315 (Relax codgen test variable regex) - #161318 (Doc: clarify how `Read::bytes` handling Interrupted errors) - #161321 (Update books) - #161335 ([compiletest] Use the correct rustc lib directory for query_rustc_output)
Rollup merge of #161115 - nia-e:allocator-nitpicks, r=clarfonthey Assorted allocator nitpicks Small things that got missed in #157428, doc language cleanup for allocator, and a rename that closes #158344. cc @rust-lang/wg-allocators. pending libs bikeshed decision on the naming of `into_raw_parts_with_alloc` r? clarfonthey
View all comments
Small things that got missed in #157428, doc language cleanup for allocator, and a rename that closes #158344. cc @rust-lang/wg-allocators. pending libs bikeshed decision on the naming of
into_raw_parts_with_allocr? clarfonthey