rustc: Fix an infinite loop during size calculations for recursive region pointer types

This commit is contained in:
Patrick Walton 2012-03-28 20:37:55 -07:00
parent 6f0cbf4cd4
commit 2663018792

View File

@ -632,7 +632,7 @@ fn simplify_type(tcx: ty::ctxt, typ: ty::t) -> ty::t {
fn simplifier(tcx: ty::ctxt, typ: ty::t) -> ty::t {
alt ty::get(typ).struct {
ty::ty_box(_) | ty::ty_opaque_box | ty::ty_uniq(_) | ty::ty_vec(_) |
ty::ty_ptr(_) { nilptr(tcx) }
ty::ty_ptr(_) | ty::ty_rptr(_,_) { nilptr(tcx) }
ty::ty_fn(_) { ty::mk_tup(tcx, [nilptr(tcx), nilptr(tcx)]) }
ty::ty_res(_, sub, tps) {
let sub1 = ty::substitute_type_params(tcx, tps, sub);