Hello!  The 0.9 release prompted me to poke at my nascent rust code.  Very
impressed with the language and the progress since I last looked (0.4
maybe?).

Some questions that I wasn't able to find answers for:

* Is there any built-in way to iterate over all values of a C-like enum?
 It's not hard to define an iterator method that implements this for any
given type, but it's tedious boilerplate that seems better left to the
compiler.

* Is it possible to express "if a type implements trait A, here is a
default implementation of trait B"?  I tried the obvious way ("impl<T:
TraitA> TraitB for T"), but it looks like the rust compiler can't
disambiguate between that impl and type-specific impls.

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

Reply via email to