]> git.lizzy.rs Git - rust.git/commit
Use more associated types in core::iter.
authorHuon Wilson <dbau.pp+github@gmail.com>
Wed, 4 Mar 2015 10:32:33 +0000 (21:32 +1100)
committerHuon Wilson <dbau.pp+github@gmail.com>
Thu, 5 Mar 2015 11:50:09 +0000 (22:50 +1100)
commit7bcf7fb5009b5dbdfa1a611fe464ca0de43c5a49
tree711b07486654bb072babdefa9d093f6a9c6f4bbb
parentfed12499e7d91f9cdfba5833e34d20e8fd19b898
Use more associated types in core::iter.

This concretely improves type inference of some cases (see included
test). I assume the compiler struggles to reason about multiple layers
of generic type parameters (even with associated-type equalities) but
*can* understand pure associated types, since they are always directly
computable from the input types.
src/libcore/iter.rs
src/test/run-pass/iter-cloned-type-inference.rs [new file with mode: 0644]