diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2013-05-03 18:51:58 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2013-05-08 17:04:00 -0700 |
| commit | db4573a7760bd2014b2eca2537b6af15a9803e3d (patch) | |
| tree | ad598aad92edd9b68fa52d8635814fcce6d54dca /src/libsyntax/ext | |
| parent | c7522417d48c03a110fa8839428424d6dbae1223 (diff) | |
| download | rust-db4573a7760bd2014b2eca2537b6af15a9803e3d.tar.gz rust-db4573a7760bd2014b2eca2537b6af15a9803e3d.zip | |
librustc: Remove mutable fields from the language.
They're still parsed though, to get through bootstrapping.
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/auto_encode.rs | 12 | ||||
| -rw-r--r-- | src/libsyntax/ext/deriving/decodable.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/ext/deriving/encodable.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/ext/deriving/iter_bytes.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/ext/pipes/pipec.rs | 6 |
5 files changed, 9 insertions, 15 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, } } } diff --git a/src/libsyntax/ext/deriving/decodable.rs b/src/libsyntax/ext/deriving/decodable.rs index 79cc4a3bda8..2bdfe51c50e 100644 --- a/src/libsyntax/ext/deriving/decodable.rs +++ b/src/libsyntax/ext/deriving/decodable.rs @@ -280,7 +280,7 @@ fn expand_deriving_decodable_struct_method( let mut fields = ~[]; for struct_def.fields.each |struct_field| { match struct_field.node.kind { - named_field(ident, _, _) => { + named_field(ident, _) => { fields.push(create_read_struct_field(cx, span, i, ident)); } unnamed_field => { diff --git a/src/libsyntax/ext/deriving/encodable.rs b/src/libsyntax/ext/deriving/encodable.rs index 8b86173dc24..54e5687f415 100644 --- a/src/libsyntax/ext/deriving/encodable.rs +++ b/src/libsyntax/ext/deriving/encodable.rs @@ -211,7 +211,7 @@ fn expand_deriving_encodable_struct_method( let mut statements = ~[]; for struct_def.fields.each |struct_field| { match struct_field.node.kind { - named_field(ident, _, _) => { + named_field(ident, _) => { // Create the accessor for this field. let self_field = build::mk_access( cx, diff --git a/src/libsyntax/ext/deriving/iter_bytes.rs b/src/libsyntax/ext/deriving/iter_bytes.rs index c1c34c9a53a..3d66506d6ca 100644 --- a/src/libsyntax/ext/deriving/iter_bytes.rs +++ b/src/libsyntax/ext/deriving/iter_bytes.rs @@ -90,4 +90,4 @@ fn iter_bytes_substructure(cx: @ext_ctxt, span: span, substr: &Substructure) -> } build::mk_block(cx, span, ~[], stmts, None) -} \ No newline at end of file +} diff --git a/src/libsyntax/ext/pipes/pipec.rs b/src/libsyntax/ext/pipes/pipec.rs index e876972fe68..00a91bdc46e 100644 --- a/src/libsyntax/ext/pipes/pipec.rs +++ b/src/libsyntax/ext/pipes/pipec.rs @@ -410,10 +410,8 @@ impl gen_init for protocol { @spanned { node: ast::struct_field_ { - kind: ast::named_field( - cx.ident_of(s.name), - ast::struct_immutable, - ast::inherited), + kind: ast::named_field(cx.ident_of(s.name), + ast::inherited), id: cx.next_id(), ty: fty, attrs: ~[], |
