-
Notifications
You must be signed in to change notification settings - Fork 13.7k
[std][BTree] Fix behavior of ::append
to match documentation, ::insert
, and ::extend
#145628
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
rustbot has assigned @Mark-Simulacrum. Use |
This (IMO) leaves ambiguous whether equal (by Eq/Ord) keys are updated or not in the implementation. Today, append will update the key as well. This PR is proposing that we align the behavior with
This is a breaking change, so nominating for libs-api. We can try running crater, but I'm not sure we'll find much signal given the specific conditions needed to trigger it (BTreeMap, using append, having keys with extra metadata, and writing a test reachable in Crater that exercises this case). HashMap's @tinnamchoi, can you also update the docs for append to reflect this change? |
::append
to match documentation and ::insert
::append
to match documentation, ::insert
, and ::extend
Resolves #145614