diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2013-03-28 11:29:21 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2013-03-28 11:30:01 -0700 |
| commit | 0a002d79b47340cc518ae4c0879a34c037c8411a (patch) | |
| tree | 5abc7366866fa6f17189bf8ef814f4955c9e776c /src/libsyntax/ext | |
| parent | 09dc38eda54537c0c10b8a89852c714e3e14f57a (diff) | |
| download | rust-0a002d79b47340cc518ae4c0879a34c037c8411a.tar.gz rust-0a002d79b47340cc518ae4c0879a34c037c8411a.zip | |
librustc: Remove common fields and nested enums from the language
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/auto_encode.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/ext/deriving/clone.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/ext/deriving/eq.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/ext/deriving/iter_bytes.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/ext/deriving/mod.rs | 8 | ||||
| -rw-r--r-- | src/libsyntax/ext/pipes/pipec.rs | 2 |
6 files changed, 5 insertions, 15 deletions
diff --git a/src/libsyntax/ext/auto_encode.rs b/src/libsyntax/ext/auto_encode.rs index 2a112f106a8..d7e0e9aa550 100644 --- a/src/libsyntax/ext/auto_encode.rs +++ b/src/libsyntax/ext/auto_encode.rs @@ -990,8 +990,6 @@ fn mk_enum_ser_body( ), ast::struct_variant_kind(*) => fail!(~"struct variants unimplemented"), - ast::enum_variant_kind(*) => - fail!(~"enum variants unimplemented"), } }; @@ -1089,8 +1087,6 @@ fn mk_enum_deser_body( }, ast::struct_variant_kind(*) => fail!(~"struct variants unimplemented"), - ast::enum_variant_kind(*) => - fail!(~"enum variants unimplemented") }; let pat = @ast::pat { diff --git a/src/libsyntax/ext/deriving/clone.rs b/src/libsyntax/ext/deriving/clone.rs index df4dd2735fc..6516bd85270 100644 --- a/src/libsyntax/ext/deriving/clone.rs +++ b/src/libsyntax/ext/deriving/clone.rs @@ -12,7 +12,7 @@ use core::prelude::*; use ast; use ast::{TraitTyParamBound, Ty, and, bind_by_ref, binop, deref, enum_def}; -use ast::{enum_variant_kind, expr, expr_match, ident, impure_fn, item, item_}; +use ast::{expr, expr_match, ident, impure_fn, item, item_}; use ast::{item_enum, item_impl, item_struct, Generics}; use ast::{m_imm, meta_item, method}; use ast::{named_field, or, pat, pat_ident, pat_wild, public, pure_fn}; diff --git a/src/libsyntax/ext/deriving/eq.rs b/src/libsyntax/ext/deriving/eq.rs index 531390035db..a1cb981e3bd 100644 --- a/src/libsyntax/ext/deriving/eq.rs +++ b/src/libsyntax/ext/deriving/eq.rs @@ -12,7 +12,7 @@ use core::prelude::*; use ast; use ast::{TraitTyParamBound, Ty, and, bind_by_ref, binop, deref, enum_def}; -use ast::{enum_variant_kind, expr, expr_match, ident, impure_fn, item, item_}; +use ast::{expr, expr_match, ident, impure_fn, item, item_}; use ast::{item_enum, item_impl, item_struct, Generics}; use ast::{m_imm, meta_item, method}; use ast::{named_field, or, pat, pat_ident, pat_wild, public, pure_fn}; diff --git a/src/libsyntax/ext/deriving/iter_bytes.rs b/src/libsyntax/ext/deriving/iter_bytes.rs index 528db0d1072..3be8bf6efb5 100644 --- a/src/libsyntax/ext/deriving/iter_bytes.rs +++ b/src/libsyntax/ext/deriving/iter_bytes.rs @@ -12,7 +12,7 @@ use core::prelude::*; use ast; use ast::{TraitTyParamBound, Ty, and, bind_by_ref, binop, deref, enum_def}; -use ast::{enum_variant_kind, expr, expr_match, ident, impure_fn, item, item_}; +use ast::{expr, expr_match, ident, impure_fn, item, item_}; use ast::{item_enum, item_impl, item_struct, Generics}; use ast::{m_imm, meta_item, method}; use ast::{named_field, or, pat, pat_ident, pat_wild, public, pure_fn}; diff --git a/src/libsyntax/ext/deriving/mod.rs b/src/libsyntax/ext/deriving/mod.rs index 21477d6e067..1b81380ec9b 100644 --- a/src/libsyntax/ext/deriving/mod.rs +++ b/src/libsyntax/ext/deriving/mod.rs @@ -15,7 +15,7 @@ use core::prelude::*; use ast; use ast::{TraitTyParamBound, Ty, and, bind_by_ref, binop, deref, enum_def}; -use ast::{enum_variant_kind, expr, expr_match, ident, impure_fn, item, item_}; +use ast::{expr, expr_match, ident, impure_fn, item, item_}; use ast::{item_enum, item_impl, item_struct, Generics}; use ast::{m_imm, meta_item, method}; use ast::{named_field, or, pat, pat_ident, pat_wild, public, pure_fn}; @@ -283,9 +283,6 @@ pub fn create_enum_variant_pattern(cx: @ext_ctxt, build::mk_pat_struct(cx, span, matching_path, field_pats) } - enum_variant_kind(*) => { - cx.span_unimpl(span, ~"enum variants for `deriving`"); - } } } @@ -293,9 +290,6 @@ pub fn variant_arg_count(cx: @ext_ctxt, span: span, variant: &variant) -> uint { match variant.node.kind { tuple_variant_kind(ref args) => args.len(), struct_variant_kind(ref struct_def) => struct_def.fields.len(), - enum_variant_kind(*) => { - cx.span_bug(span, ~"variant_arg_count: enum variants deprecated") - } } } diff --git a/src/libsyntax/ext/pipes/pipec.rs b/src/libsyntax/ext/pipes/pipec.rs index a7725eab695..99033b3b3cc 100644 --- a/src/libsyntax/ext/pipes/pipec.rs +++ b/src/libsyntax/ext/pipes/pipec.rs @@ -238,7 +238,7 @@ impl to_type_decls for state { cx.item_enum_poly( name, self.span, - ast::enum_def { variants: items_msg, common: None }, + ast::enum_def { variants: items_msg }, cx.strip_bounds(&self.generics) ) ] |
