Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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
lkuper committed Aug 21, 2013
1 parent bf90634 commit 3613c22
Show file tree
Hide file tree
Showing 4 changed files with 250 additions and 467 deletions.

5 comments on commit 3613c22

@bors
Copy link
Contributor

@bors bors commented on 3613c22 Aug 22, 2013

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

@bors
Copy link
Contributor

@bors bors commented on 3613c22 Aug 22, 2013

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

@bors
Copy link
Contributor

@bors bors commented on 3613c22 Aug 22, 2013

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

@bors
Copy link
Contributor

@bors bors commented on 3613c22 Aug 22, 2013

@bors
Copy link
Contributor

@bors bors commented on 3613c22 Aug 22, 2013

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

Please sign in to comment.