Skip to content

Commit ac6e113

Browse files
committed
Teach creader and metadata writer how to do ty.ty_type.
1 parent b628c35 commit ac6e113

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

src/comp/front/creader.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ impure fn parse_sty(@pstate st, str_def sd) -> ty.sty {
189189
}
190190
case ('X') {ret ty.ty_var(parse_int(st));}
191191
case ('E') {ret ty.ty_native;}
192+
case ('Y') {ret ty.ty_type;}
192193
}
193194
}
194195

src/comp/middle/metadata.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ fn sty_str(ty.sty st, def_str ds) -> str {
123123
case (ty.ty_var(?id)) {ret "X" + common.istr(id);}
124124
case (ty.ty_native) {ret "E";}
125125
case (ty.ty_param(?def)) {ret "p" + ds(def);}
126-
// TODO (maybe?) ty_type;
126+
case (ty.ty_type) {ret "Y";}
127127
}
128128
}
129129

@@ -421,3 +421,13 @@ fn write_metadata(@trans.crate_ctxt cx, @ast.crate crate) {
421421
llvm.LLVMSetSection(llglobal, _str.buf(x86.get_meta_sect_name()));
422422
}
423423

424+
//
425+
// Local Variables:
426+
// mode: rust
427+
// fill-column: 78;
428+
// indent-tabs-mode: nil
429+
// c-basic-offset: 4
430+
// buffer-file-coding-system: utf-8-unix
431+
// compile-command: "make -k -C $RBUILD 2>&1 | sed -e 's/\\/x\\//x:\\//g'";
432+
// End:
433+
//

0 commit comments

Comments
 (0)