These are chat archives for rust-lang/rust

2nd
Jun 2017
Scott Corbeil
@scorbeil
Jun 02 2017 17:54

I'm sorry in advance for what's probably a dumb question, but I've been messing with this for a while and can't figure it out with docs/googling... I'm sure I'm going to have a "duh" moment once I know.

I want to express that a struct field is an iterator of some type over which the struct itself is generic. In other words, something like this:

struct Foo<T, U> {
fld1: Iterator<T>,
fld2: U,
}

Assistance greatly appreciated :)

Denis Lisov
@tanriol
Jun 02 2017 18:09
struct Foo<T, I: Iterator<Item=T>, U> {
    fld1: I,
    fld2: U,
}
Scott Corbeil
@scorbeil
Jun 02 2017 18:11
Thank you :)
Zizheng Tai
@ZizhengTai
Jun 02 2017 18:45
Hi all, what's the current status on higher-kinded types in Rust?
devlinzed
@devlinzed
Jun 02 2017 18:57
rust-lang/rfcs#324