about summary refs log tree commit diff
path: root/src/libsyntax/ext/auto_encode.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsyntax/ext/auto_encode.rs')
-rw-r--r--src/libsyntax/ext/auto_encode.rs12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/libsyntax/ext/auto_encode.rs b/src/libsyntax/ext/auto_encode.rs
index bdf0a2a1dd0..5bd4f89a3b3 100644
--- a/src/libsyntax/ext/auto_encode.rs
+++ b/src/libsyntax/ext/auto_encode.rs
@@ -914,19 +914,15 @@ struct field {
 
 fn mk_struct_fields(fields: &[@ast::struct_field]) -> ~[field] {
     do fields.map |field| {
-        let (ident, mutbl) = match field.node.kind {
-            ast::named_field(ident, mutbl, _) => (ident, mutbl),
-            _ => fail!(~"[auto_encode] does not support \
-                        unnamed fields")
+        let ident = match field.node.kind {
+            ast::named_field(ident, _) => ident,
+            _ => fail!(~"[auto_encode] does not support unnamed fields")
         };
 
         field {
             span: field.span,
             ident: ident,
-            mutbl: match mutbl {
-                ast::struct_mutable => ast::m_mutbl,
-                ast::struct_immutable => ast::m_imm,
-            },
+            mutbl: ast::m_imm,
         }
     }
 }