On 3/24/14 11:46 PM, Nick Cameron wrote:
Currently we forbid bounds on type parameters in structs, enums, and
types. So the following is illegal:

struct S<X: B> {
     f: ~T<X>,
}

IIRC Haskell allows bounds on type parameters (and we did once too), but I heard that considered deprecated and not preferred. I don't recall the exact reasons, but that's why we removed the feature (and also just for language simplicity).

Patrick

_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to