Skip to content

Commit 2663018

Browse files
committed
rustc: Fix an infinite loop during size calculations for recursive region pointer types
1 parent 6f0cbf4 commit 2663018

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rustc/middle/trans/shape.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ fn simplify_type(tcx: ty::ctxt, typ: ty::t) -> ty::t {
632632
fn simplifier(tcx: ty::ctxt, typ: ty::t) -> ty::t {
633633
alt ty::get(typ).struct {
634634
ty::ty_box(_) | ty::ty_opaque_box | ty::ty_uniq(_) | ty::ty_vec(_) |
635-
ty::ty_ptr(_) { nilptr(tcx) }
635+
ty::ty_ptr(_) | ty::ty_rptr(_,_) { nilptr(tcx) }
636636
ty::ty_fn(_) { ty::mk_tup(tcx, [nilptr(tcx), nilptr(tcx)]) }
637637
ty::ty_res(_, sub, tps) {
638638
let sub1 = ty::substitute_type_params(tcx, tps, sub);

0 commit comments

Comments
 (0)