-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
DO NOT MERGE: experimental implementation of Entry API RFC #37143
Conversation
r? @sfackler (rust_highfive has picked a reviewer for you, use r? to override) |
r? @aturon |
Starting crater. |
Travis failures are |
@brson Thanks a lot for doing the crater run! Here's my analysis of the results. There 9 irreconcilable regressions caused by actual inference failures introduced by widening the allowed argument types of
|
* B is now type parameter of `Entry`. * B is ?Sized in `.entry` methods on maps (previous oversight). * Deref coercions are now handled seamlessly by `AsBorrowOf`.
I'm going to close this in favor of the RFC for now, just trying to clear out the PR queue. I'm fine reopening though once we decide on the RFC! |
@alexcrichton Makes sense, in the meantime I'd love to get more feedback on the RFC though! |
RFC: rust-lang/rfcs#1769
Entry::key
andVacantEntry::key
only whenQ=K
.BTreeMap
andHashMap
.AsBorrowOf
.IntoOwned<K>
trait ends being annoying requiring aB
parameter added toor_insert
andor_insert_with
.<B>
parameter toor_insert_with
is, I think, a breaking change because writingor_insert_with<_>
is not valid any more. In reality I imagine this never happens.IntoOwned
/AsBorrowOf
separation.