diff options
| author | Patrick Walton <[email protected]> | 2011-05-12 18:37:28 -0700 |
|---|---|---|
| committer | Patrick Walton <[email protected]> | 2011-05-12 18:37:28 -0700 |
| commit | 5295a4dabda8f49c1c148b17d13c9074291d45bc (patch) | |
| tree | 7bddf8a424e600925ca066ae8478b083d3a242ec /src/comp/middle/trans.rs | |
| parent | rustc: Beginnings of a "shape" module to convert types to shapes (diff) | |
| download | rust-5295a4dabda8f49c1c148b17d13c9074291d45bc.tar.xz rust-5295a4dabda8f49c1c148b17d13c9074291d45bc.zip | |
rustc: Flatten recursive vectors in trans::simplify_type(). Prevents an infinite loop.
Diffstat (limited to 'src/comp/middle/trans.rs')
| -rw-r--r-- | src/comp/middle/trans.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs index 7a55be10..78a7a16a 100644 --- a/src/comp/middle/trans.rs +++ b/src/comp/middle/trans.rs @@ -1231,6 +1231,9 @@ fn simplify_type(&@crate_ctxt ccx, &ty::t typ) -> ty::t { case (ty::ty_box(_)) { ret ty::mk_imm_box(ccx.tcx, ty::mk_nil(ccx.tcx)); } + case (ty::ty_vec(_)) { + ret ty::mk_imm_vec(ccx.tcx, ty::mk_nil(ccx.tcx)); + } case (_) { ret typ; } } } |