-
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
Reduce the number of clone()s needed in obligation_forest #52306
Conversation
r? @varkor (rust_highfive has picked a reviewer for you, use r? to override) |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
if let Some((predicate, _)) = self.waiting_cache | ||
.remove_entry(self.nodes[i].obligation.as_predicate()) | ||
{ | ||
self.done_cache.insert(predicate); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a comment along the lines of // Avoid an extra clone() in this case.
, just to make clear that the two branches have the same behaviour?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me after the comment and squashing the two commits.
Some can be avoided by using remove_entry instead of remove.
31c1ffb
to
384d04d
Compare
Squashed and commented. |
Thanks! @bors r+ rollup |
📌 Commit 384d04d has been approved by |
…arkor Reduce the number of clone()s needed in obligation_forest Some can be avoided by using `remove_entry` instead of `remove`.
Rollup of 9 pull requests Successful merges: - #52286 (Deny bare trait objects in src/librustc_errors) - #52306 (Reduce the number of clone()s needed in obligation_forest) - #52338 (update miri) - #52385 (Pass edition flags to compiler from rustdoc as expected) - #52392 (AsRef doc wording tweaks) - #52430 (update nomicon) - #52434 (Enable incremental independent of stage) - #52435 (Calculate the exact capacity for 2 HashMaps) - #52446 (Block beta if clippy breaks.) r? @ghost
Some can be avoided by using
remove_entry
instead ofremove
.