It’s finally coming! We’re in the home stretch for landing the long-awaited impl Trait feature. impl Trait allows functions to accept and return values of unnamed types that implement some trait.

Many longstanding bugs and ICEs have been fixed, and final syntax details are nearly resolved. With that in mind, we need help testing and experimenting with the feature before stabilizing. Please consider taking a moment or two to play around with the feature, perhaps by converting existing Rust libraries or projects to use impl Trait . To try it yourself, just update to the latest nightly and put #![feature(conservative_impl_trait, universal_impl_trait)] at the top of your crate, like this:

#![feature(conservative_impl_trait, universal_impl_trait)] fn running_count(iter: impl Iterator<Item = u32>) -> impl Iterator<Item = u32> { let mut cnt = 0; iter.map(move |x| { cnt += x; cnt }) } fn main() { for cnt in running_count(1..10) { println!("{}", cnt); } }

If you have any question, concerns, or feedback about the feature, please message me on IRC, Gitter, or open an issue on rust-lang/rust and cc me (cramertj).

Known remaining issues: