stabilize Box::take - #160436
stabilize Box::take#160436
Box::take#160436Conversation
|
r? @Darksonn rustbot has assigned @Darksonn. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
@rustbot label +I-libs-api-nominated |
|
@rfcbot merge libs-api |
|
@Amanieu has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
|
🔔 This is now entering its final comment period, as per the review above. 🔔 |
|
I wonder if there might be a better name - currently in the standard library, |
|
I like to think of the use of
The other suggestion in the tracking issue was |
Indeed, I believe we should lose ability 2 from the list, because That's a cross post from rust-lang/rfcs#4000 (comment). |
While this would be fine regarding this API, it would put |
I agree. A |
|
A From my point of view, |
If the allocator does the work of ensuring that the field behaves like an allocation, then yes, it is. After a quick read of the mentioned RFC, I think that under my preferred interpretation of the safety contract for |
|
I agree that 2 is to be dropped. It's misuse of box, and if we want |
You should not be able to get an This is the same reason |
|
Given that the stabilization of |
|
It looks like @Amanieu libs-nominated this for discussion, but then the label was lost. Did any further discussion occur / is it needed? |
I think we should drop 3 (thereby allowing you to scribble over memory when/after dropping the |
|
Apologies, we thought this got through to the relevant folks. Our conclusion was that we're fine with stabilising this as-is |
|
@bors r+ |
…sonn stabilize `Box::take` Tracking issue: rust-lang#147212 There hasn't been any activity on the tracking issue for a while, and this is a pretty small feature, so opening this to hopefully get a FCP started. Closes: rust-lang#147212
…uwer Rollup of 13 pull requests Successful merges: - #156949 (Detect missing else in let statement) - #160436 (stabilize `Box::take`) - #160570 (macro_metavar_expr_concat: support concatenating into string literals) - #162837 (Dedicated Display type for CStr::display) - #163099 (Use wrapping arithmetic in `from_str_radix`) - #163166 (Tiny cleanups to deferred liveness) - #161667 (Add `f16` inline ASM support for `nvptx64-nvidia-cuda`) - #163063 (Restore `Send` and `Sync` for `BorrowedCursor`) - #163097 (OpenBSD/sparc64 has switched from GCC to Clang) - #163126 (Skip redundant storage-conflict updates during coroutine layout) - #163135 (librustdoc: remove stale dep on base64) - #163146 (tests: Update `f16b` codegen test for LoongArch and RISC-V) - #163159 (treat inductive cycles as ambig)
View all comments
Tracking issue: #147212
There hasn't been any activity on the tracking issue for a while, and this is a pretty small feature, so opening this to hopefully get a FCP started.
Closes: #147212