-
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
@rfcbot merge |
Team member @joshtriplett 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. |
We discussed this in today's @rust-lang/libs-api meeting. We'd like to make this change, hence the FCP to confirm consensus. People did express a desire to get whatever signal crater can give us, but it might not be worth a dedicated crater run; perhaps we should just rely on the beta crater run? |
Beta crater is probably too noisy (especially for tests) for this purpose, dedicated run then seems better. @bors try |
This comment has been minimized.
This comment has been minimized.
[std][BTree] Fix behavior of `::append` to match documentation, `::insert`, and `::extend`
@craterbot run mode=build-and-test |
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
Resolves #145614