]> git.lizzy.rs Git - rust.git/blobdiff - src/libsyntax/ext/deriving/show.rs
Associated types support for deriving::generic::TraitDef
[rust.git] / src / libsyntax / ext / deriving / show.rs
index f5b5d4dda199c90ea1eeb4c014d5ab3ece96ac71..ec5941f58f3f02c1aaf49b01a8d3ceafd0970689 100644 (file)
@@ -35,10 +35,10 @@ pub fn expand_deriving_show<F>(cx: &mut ExtCtxt,
     let trait_def = TraitDef {
         span: span,
         attributes: Vec::new(),
-        path: Path::new(vec!("std", "fmt", "Debug")),
+        path: Path::new(vec!["std", "fmt", "Debug"]),
         additional_bounds: Vec::new(),
         generics: LifetimeBounds::empty(),
-        methods: vec!(
+        methods: vec![
             MethodDef {
                 name: "fmt",
                 generics: LifetimeBounds::empty(),
@@ -50,7 +50,8 @@ pub fn expand_deriving_show<F>(cx: &mut ExtCtxt,
                     show_substructure(a, b, c)
                 })
             }
-        )
+        ],
+        associated_types: Vec::new(),
     };
     trait_def.expand(cx, mitem, item, push)
 }