-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
traits: Implement interning for Goal and Clause #49800
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
Conversation
|
Your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem. 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 |
919e8ca to
0ba778b
Compare
|
@ishitatsuyuki nice! I added a note about this PR to the WG-traits planning meeting document, btw |
|
☔ The latest upstream changes (presumably #49435) made this pull request unmergeable. Please resolve the merge conflicts. |
0ba778b to
8720ded
Compare
|
☔ The latest upstream changes (presumably #49390) made this pull request unmergeable. Please resolve the merge conflicts. |
8720ded to
7a66d2f
Compare
nikomatsakis
left a comment
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.
Looks great! One change though -- foldable looks not right to me.
src/librustc/traits/mod.rs
Outdated
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.
Woohoo, copy types FTW 🐻
src/librustc/traits/mod.rs
Outdated
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.
Maybe worth a type alias? Goals<'tcx>? Or, maybe not. Meh.
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.
Wait. This doesn't look right. I expect something more like the impl for Slice. That is, super_fold_with should do something like:
fn super_fold_with<'gcx: 'tcx, F: TypeFolder<'gcx, 'tcx>>(&self, _folder: &mut F) -> Self {
let goal: Goal<'tcx> = (*self).fold_with(folder);
self.tcx().mk_goal(goal)
}and visit_with:
fn super_visit_with(...) {
(*self).visit_with(visitor)
}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.
Do we want an impl for &'tcx Clause<'tcx>? Probably, though maybe we don't need it yet.
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.
At some point we should think about making a macro for these "intern-wrapping impls"... but not, I suppose, in this PR.
src/librustc/ty/context.rs
Outdated
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.
this is clever...
7a66d2f to
b15df80
Compare
|
@bors r+ |
|
📌 Commit b15df80 has been approved by |
|
⌛ Testing commit b15df80 with merge f6af3b347421667028bda0ba004fb554dd706932... |
|
💔 Test failed - status-appveyor |
|
@bors retry 3 hour timeout in TimingsTop 10:
|
|
@bors p=9 |
traits: Implement interning for Goal and Clause r? @nikomatsakis Close #49054 Contains some refactoring for the interning mechanism, mainly aimed at reducing pain when changing types of interning map. This should be mostly good, although I'm not sure with the naming of `Goal::from_poly_domain_goal`.
|
☀️ Test successful - status-appveyor, status-travis |
r? @nikomatsakis
Close #49054
Contains some refactoring for the interning mechanism, mainly aimed at reducing pain when changing types of interning map.
This should be mostly good, although I'm not sure with the naming of
Goal::from_poly_domain_goal.