-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
BTreeMap: relax the explicit borrow rule to make code shorter and safer #79521
Conversation
f657761
to
056bfb7
Compare
056bfb7
to
22d0605
Compare
@bors r+ |
📌 Commit 22d06052a76860c4ff84198fbb9c068ac4cb0909 has been approved by |
@bors rollup=never |
🔒 Merge conflict This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again. How do I rebase?Assuming
You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial. Please avoid the "Resolve conflicts" button on GitHub. It uses Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Error message
|
22d0605
to
22b8266
Compare
The conflict in
reminds me of an issue I tried in vain to list here in an earlier version of the description: the old definition of |
Actually, these lifetime rules must be right because they mimic the public API of |
☔ The latest upstream changes (presumably #80114) made this pull request unmergeable. Please resolve the merge conflicts. Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels:
|
22b8266
to
29114ff
Compare
@rustbot modify labels: +S-waiting-on-review -S-waiting-on-author |
@bors r+ rollup=never |
📌 Commit 29114ff has been approved by |
☀️ Test successful - checks-actions |
Expressions like
.reborrow_mut().into_len_mut()
are annoyingly long, and kind of dangerous for the reasonreborrow_mut()
is unsafe. By relaxing the single rule, we no longer have to make an exception for functions with aborrow
name and functions likeas_leaf_mut
. This is largely restoring the declaration style of the btree::node API about a year ago, but with more explanation and consistency.r? @Mark-Simulacrum