Conversation
library/alloc/src/boxed.rs
Outdated
There was a problem hiding this comment.
This moves code A down into impl block B, but the diff shows B being moved up past A.
So this actually moves into_raw and into_non_null (expand below this seeming addition) into an impl block that is generic over the allocator, such that they can accept Boxes that use an allocator different from the Global one. This is needed for the changes in linked_list.rs to replace Box::leak (which is also generic over allocator).
This probably needs some libs discussion/approval.
There was a problem hiding this comment.
Could you make the diff smaller by separating A into it's own impl block without moving it?
There was a problem hiding this comment.
Good idea. That should probably work. Done now.
This comment has been minimized.
This comment has been minimized.
27e8c16 to
aee975a
Compare
This comment has been minimized.
This comment has been minimized.
|
Pending CI passing @rustbot author |
aee975a to
eea3d79
Compare
|
@rustbot ready |
|
@bors r+ rollup |
Rollup merge of #150344 - hkBst:cleanup-linked-list, r=jhpratt Cleanup linked list - Replaces some checked_sub().unwrap_or(0) with saturating_sub(). - Replaces NonNull::from(Box::leak(node)) with Box::into_non_null(node)
Uh oh!
There was an error while loading. Please reload this page.