> It can't be defined that way without becoming much less useful for
> more common cases.

Any example of this?

Iterators are most commonly used in for loops, and this change makes no 
difference in this case. Functions that transform iterators also work the same.

Things like collect() don't work for all iterators, but it should be possible 
to make them work for iterators on types that don't have lifetimes.

That is, introducing syntax like this:
fn collect<'a, T:'a, U: Iterator<T>>(iter: U) -> ~['a U] {}

where the 'a bound on T means that the 'x T is convertible to 'a T for any x.   
                                  
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to