mozilla/rust — pull request #7055 by thestinger (2013-06-11 06:06:27+00:00)
Title: switch Option to external iterators

This was a lot more painful than just changing `x.each` to `x.iter().advance` . I ran into my old friend #5898 and had to add underscores to some method names as a temporary workaround.

The borrow checker also had other ideas because rvalues aren't handled very well yet so temporary variables had to be added. However, storing the temporary in a variable led to dynamic `@mut` failures, so those had to be wrapped in blocks except where the scope ends immediately.

Anyway, the ugliness will be fixed as the compiler issues are fixed.

I dropped the run-pass tests for `old_iter` because there's not much point in fixing a module that's on the way out in the next week or so.