Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor type combining to use default methods. Woohoo!
This commit removes the "super_*" functions from typeck::infer::combine, and adds them as default methods on the Combine trait instead, making it possible to remove a lot of boilerplate from the various impls of Combine. I've been wanting to do this for over a year. In fact, it was my original motivation for default methods! It might be possible to tighten things up even more, but this is the bulk of it.
- Loading branch information
3613c22
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.
saw approval from nikomatsakis
at lkuper@3613c22
3613c22
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.
merging lkuper/rust/infer-refactor = 3613c22 into auto
3613c22
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.
lkuper/rust/infer-refactor = 3613c22 merged ok, testing candidate = 063a005
3613c22
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.
all tests pass:
success: http://buildbot.rust-lang.org/builders/auto-mac-32-opt/builds/1036
success: http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/1039
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-c/builds/145
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/145
success: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/1054
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-c/builds/145
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/145
success: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/1054
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-c/builds/145
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/145
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android/builds/227
success: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/1039
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-c/builds/145
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/145
success: http://buildbot.rust-lang.org/builders/auto-bsd-64-opt/builds/825
3613c22
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.
fast-forwarding master to auto = 063a005