let trait_def = TraitDef {
span: span,
attributes: Vec::new(),
- path: Path::new(vec!("std", "fmt", "Show")),
+ path: Path::new(vec!["std", "fmt", "Debug"]),
additional_bounds: Vec::new(),
generics: LifetimeBounds::empty(),
- methods: vec!(
+ methods: vec![
MethodDef {
name: "fmt",
generics: LifetimeBounds::empty(),
show_substructure(a, b, c)
})
}
- )
+ ],
+ associated_types: Vec::new(),
};
trait_def.expand(cx, mitem, item, push)
}
Struct(_) => substr.type_ident,
EnumMatching(_, v, _) => v.node.name,
EnumNonMatchingCollapsed(..) | StaticStruct(..) | StaticEnum(..) => {
- cx.span_bug(span, "nonsensical .fields in `#[derive(Show)]`")
+ cx.span_bug(span, "nonsensical .fields in `#[derive(Debug)]`")
}
};
let formatter = substr.nonself_args[0].clone();
let meth = cx.ident_of("write_fmt");
- let s = token::intern_and_get_ident(format_string.index(&FullRange));
+ let s = token::intern_and_get_ident(&format_string[]);
let format_string = cx.expr_str(span, s);
// phew, not our responsibility any more!