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/ty.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/ty.rs')
| -rw-r--r-- | src/comp/middle/ty.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/comp/middle/ty.rs b/src/comp/middle/ty.rs index 9f62f2b2..42bd68af 100644 --- a/src/comp/middle/ty.rs +++ b/src/comp/middle/ty.rs @@ -427,6 +427,11 @@ fn mk_imm_box(&ctxt cx, &t ty) -> t { } fn mk_vec(&ctxt cx, &mt tm) -> t { ret gen_ty(cx, ty_vec(tm)); } + +fn mk_imm_vec(&ctxt cx, &t typ) -> t { + ret gen_ty(cx, ty_vec(rec(ty=typ, mut=ast::imm))); +} + fn mk_port(&ctxt cx, &t ty) -> t { ret gen_ty(cx, ty_port(ty)); } fn mk_chan(&ctxt cx, &t ty) -> t { ret gen_ty(cx, ty_chan(ty)); } fn mk_task(&ctxt cx) -> t { ret gen_ty(cx, ty_task); } |