Do not try to encode/decode inference types, should not be necessary

r=brson
This commit is contained in:
Niko Matsakis 2013-01-22 07:02:09 -08:00
parent 19e015c44a
commit 923b3154c6
2 changed files with 2 additions and 16 deletions

View File

@ -323,9 +323,6 @@ fn parse_ty(st: @pstate, conv: conv_did) -> ty::t {
'f' => {
parse_ty_rust_fn(st, conv)
}
'X' => {
return ty::mk_var(st.tcx, ty::TyVid(parse_int(st) as uint));
}
'Y' => return ty::mk_type(st.tcx),
'C' => {
let proto = parse_proto(st);

View File

@ -298,19 +298,8 @@ fn enc_sty(w: io::Writer, cx: @ctxt, +st: ty::sty) {
ty::ty_fn(ref f) => {
enc_ty_fn(w, cx, (*f));
}
ty::ty_infer(ty::TyVar(id)) => {
w.write_char('X');
w.write_uint(id.to_uint());
}
ty::ty_infer(ty::IntVar(id)) => {
w.write_char('X');
w.write_char('I');
w.write_uint(id.to_uint());
}
ty::ty_infer(ty::FloatVar(id)) => {
w.write_char('X');
w.write_char('F');
w.write_uint(id.to_uint());
ty::ty_infer(_) => {
cx.diag.handler().bug(~"Cannot encode inference variable types");
}
ty::ty_param({idx: id, def_id: did}) => {
w.write_char('p');