Do not try to encode/decode inference types, should not be necessary
r=brson
This commit is contained in:
parent
19e015c44a
commit
923b3154c6
|
@ -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);
|
||||
|
|
|
@ -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');
|
||||
|
|
Loading…
Reference in New Issue