-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
LinkedList::remove forgets the allocator #125950
Copy link
Copy link
Closed
Labels
A-allocatorsArea: Custom and system allocatorsArea: Custom and system allocatorsA-collectionsArea: `std::collections`Area: `std::collections`C-bugCategory: This is a bug.Category: This is a bug.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-allocatorsArea: Custom and system allocatorsArea: Custom and system allocatorsA-collectionsArea: `std::collections`Area: `std::collections`C-bugCategory: This is a bug.Category: This is a bug.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
I tried this code:
I expected to see this happen: alloc and dealloc is printed
Instead, this happened: only alloc is printed
Meta
rustc --version --verbose:LinkedList::removeforgets that it's been initialized with an allocator, and always deletes the node with the global allocator.rust/library/alloc/src/collections/linked_list.rs
Line 1708 in 1689a5a
There seems to be one more place where this happens in the same file.