about summary refs log tree commit diff
path: root/src/libsyntax/ext/expand.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsyntax/ext/expand.rs')
-rw-r--r--src/libsyntax/ext/expand.rs17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs
index 5fb0126cdd0..fa0b747f45b 100644
--- a/src/libsyntax/ext/expand.rs
+++ b/src/libsyntax/ext/expand.rs
@@ -1393,15 +1393,16 @@ impl<'a, 'b> Folder for MacroExpander<'a, 'b> {
 
     fn fold_method(&mut self, m: ast::Method) -> ast::Method {
         match m {
-            ast::MethDecl(generics, abi, explicit_self, fn_style, decl, body) => {
+            ast::MethDecl(sig, body) => {
                 let (rewritten_fn_decl, rewritten_body)
-                    = expand_and_rename_fn_decl_and_block(decl, body, self);
-                ast::MethDecl(self.fold_generics(generics),
-                              abi,
-                              self.fold_explicit_self(explicit_self),
-                              fn_style,
-                              rewritten_fn_decl,
-                              rewritten_body)
+                    = expand_and_rename_fn_decl_and_block(sig.decl, body, self);
+                ast::MethDecl(ast::MethodSig {
+                    generics: self.fold_generics(sig.generics),
+                    abi: sig.abi,
+                    explicit_self: self.fold_explicit_self(sig.explicit_self),
+                    unsafety: sig.unsafety,
+                    decl: rewritten_fn_decl
+                }, rewritten_body)
             }
             ast::MethMac(mac) => ast::MethMac(mac)
         }