-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Push new allocator trait through
BTreeMap
The `BTreeMap` implementation was updated with support for custom allocators, but many of the methods that take allocators do not require that the provided allocator is the same allocator that is used for the owning `BTreeMap`. This could lead to situations where nodes are created with a different allocator, which would violate the safety conditions of `deallocate` on drop. This was discovered because the changes to `Box::leak` make it invalid to call without upgrading the allocator to `A: PinSafeAllocator`. This also updates `Box::pin_in` with the new `PinSafeAllocator` trait.
- Loading branch information
Showing
12 changed files
with
203 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.