}
}
-//NOTE(stage0): remove impl after snapshot
-#[cfg(stage0)]
-impl<'a> fmt::Show for TyParamBounds<'a> {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- fmt::String::fmt(self, f)
- }
-}
-
+ impl<'a, T: fmt::String> fmt::String for CommaSep<'a, T> {
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ for (i, item) in self.0.iter().enumerate() {
+ if i != 0 { try!(write!(f, ", ")); }
+ try!(write!(f, "{}", item));
+ }
+ Ok(())
+ }
+ }
+
impl<'a> fmt::String for TyParamBounds<'a> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
let &TyParamBounds(bounds) = self;