about summary refs log tree commit diff
path: root/src/rustc/metadata/encoder.rs
diff options
context:
space:
mode:
authorTim Chevalier <chevalier@alum.wellesley.edu>2012-03-03 17:49:23 -0800
committerTim Chevalier <chevalier@alum.wellesley.edu>2012-03-04 12:43:17 -0800
commite2fa6f03f5b3195b2f81e259a6b946567440b576 (patch)
treeed57e10c040505678b037902964f6d543d2cd52f /src/rustc/metadata/encoder.rs
parent1d826b735c30a89bfe3aac8acbcda4efc8b5286f (diff)
downloadrust-e2fa6f03f5b3195b2f81e259a6b946567440b576.tar.gz
rust-e2fa6f03f5b3195b2f81e259a6b946567440b576.zip
Translate simple classes
    Programs using classes with fields only (no methods) compile and run,
    as long as nothing refers to a class in a different crate (todo).

    Also changed the AST representation of classes to have a separate
    record for constructor info (instead of inlining the fields in the
    item_class node), and fixed up spans and pretty-printing for
    classes.
Diffstat (limited to 'src/rustc/metadata/encoder.rs')
-rw-r--r--src/rustc/metadata/encoder.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rustc/metadata/encoder.rs b/src/rustc/metadata/encoder.rs
index 2da07511628..a8173d51f06 100644
--- a/src/rustc/metadata/encoder.rs
+++ b/src/rustc/metadata/encoder.rs
@@ -127,7 +127,7 @@ fn encode_module_item_paths(ebml_w: ebml::writer, module: _mod, path: [str],
             encode_def_id(ebml_w, local_def(it.id));
             ebml_w.end_tag();
           }
-          item_class(_,_,_,_,_) {
+          item_class(_,_,_) {
               fail "encode: implement item_class";
           }
           item_enum(variants, tps) {
@@ -384,7 +384,7 @@ fn encode_info_for_item(ecx: @encode_ctxt, ebml_w: ebml::writer, item: @item,
         encode_enum_variant_info(ecx, ebml_w, item.id, variants,
                                  path, index, tps);
       }
-      item_class(_,_,_,_,_) {
+      item_class(_,_,_) {
           fail "encode: implement item_class";
       }
       item_res(_, tps, _, _, ctor_id) {