]> git.lizzy.rs Git - rust.git/blobdiff - src/libsyntax/ext/deriving/decodable.rs
auto merge of #13704 : edwardw/rust/doc-hidden, r=alexcrichton
[rust.git] / src / libsyntax / ext / deriving / decodable.rs
index 579de82c8db376efe4a73c536ff3746c437765fa..062f198425b28d0ab7289608e18c26c5063e13ef 100644 (file)
@@ -13,6 +13,7 @@
 encodable.rs for more.
 */
 
+use ast;
 use ast::{MetaItem, Item, Expr, MutMutable, Ident};
 use codemap::Span;
 use ext::base::ExtCtxt;
@@ -35,10 +36,10 @@ pub fn expand_deriving_decodable(cx: &mut ExtCtxt,
         additional_bounds: Vec::new(),
         generics: LifetimeBounds {
             lifetimes: Vec::new(),
-            bounds: vec!(("__D", vec!(Path::new_(
+            bounds: vec!(("__D", ast::StaticSize, vec!(Path::new_(
                             vec!("serialize", "Decoder"), None,
                             vec!(~Literal(Path::new_local("__E"))), true))),
-                         ("__E", vec!()))
+                         ("__E", ast::StaticSize, vec!()))
         },
         methods: vec!(
             MethodDef {
@@ -49,9 +50,11 @@ pub fn expand_deriving_decodable(cx: &mut ExtCtxt,
                             Borrowed(None, MutMutable))),
                 ret_ty: Literal(Path::new_(vec!("std", "result", "Result"), None,
                                           vec!(~Self, ~Literal(Path::new_local("__E"))), true)),
-                inline: false,
+                attributes: Vec::new(),
                 const_nonmatching: true,
-                combine_substructure: decodable_substructure,
+                combine_substructure: combine_substructure(|a, b, c| {
+                    decodable_substructure(a, b, c)
+                }),
             })
     };