Skip to content

Commit 2b28115

Browse files
committed
Do not try to encode/decode inference types, should not be necessary
1 parent fa71997 commit 2b28115

File tree

2 files changed

+2
-16
lines changed

2 files changed

+2
-16
lines changed

src/librustc/metadata/tydecode.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -323,9 +323,6 @@ fn parse_ty(st: @pstate, conv: conv_did) -> ty::t {
323323
'f' => {
324324
parse_ty_rust_fn(st, conv)
325325
}
326-
'X' => {
327-
return ty::mk_var(st.tcx, ty::TyVid(parse_int(st) as uint));
328-
}
329326
'Y' => return ty::mk_type(st.tcx),
330327
'C' => {
331328
let proto = parse_proto(st);

src/librustc/metadata/tyencode.rs

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -298,19 +298,8 @@ fn enc_sty(w: io::Writer, cx: @ctxt, +st: ty::sty) {
298298
ty::ty_fn(ref f) => {
299299
enc_ty_fn(w, cx, (*f));
300300
}
301-
ty::ty_infer(ty::TyVar(id)) => {
302-
w.write_char('X');
303-
w.write_uint(id.to_uint());
304-
}
305-
ty::ty_infer(ty::IntVar(id)) => {
306-
w.write_char('X');
307-
w.write_char('I');
308-
w.write_uint(id.to_uint());
309-
}
310-
ty::ty_infer(ty::FloatVar(id)) => {
311-
w.write_char('X');
312-
w.write_char('F');
313-
w.write_uint(id.to_uint());
301+
ty::ty_infer(_) => {
302+
cx.diag.handler().bug(~"Cannot encode inference variable types");
314303
}
315304
ty::ty_param({idx: id, def_id: did}) => {
316305
w.write_char('p');

0 commit comments

Comments
 (0)