diff options
| author | Graydon Hoare <[email protected]> | 2011-04-26 20:39:33 +0000 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2011-04-26 20:39:33 +0000 |
| commit | bc6e9815379e31ac42b4d9fd2b0e20f708c1cc1c (patch) | |
| tree | f9ccd0dac288b2751536a6e552ec8e094e2a6739 /src/comp/middle | |
| parent | Various bits of trans lint, nothing major. (diff) | |
| parent | rustc: Cap ridiculous type name sizes (diff) | |
| download | rust-bc6e9815379e31ac42b4d9fd2b0e20f708c1cc1c.tar.xz rust-bc6e9815379e31ac42b4d9fd2b0e20f708c1cc1c.zip | |
Merge branch 'master' of ssh://github.com/graydon/rust
Diffstat (limited to 'src/comp/middle')
| -rw-r--r-- | src/comp/middle/ty.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/comp/middle/ty.rs b/src/comp/middle/ty.rs index 04bea450..24078767 100644 --- a/src/comp/middle/ty.rs +++ b/src/comp/middle/ty.rs @@ -630,7 +630,9 @@ fn ty_to_str(ctxt cx, &t typ) -> str { fn ty_to_abbrev_str(ctxt cx, t typ) -> str { auto f = def_to_str; auto ecx = @rec(ds=f, tcx=cx); - ret metadata.Encode.ty_str(ecx, typ); + auto s = metadata.Encode.ty_str(ecx, typ); + if (_str.byte_len(s) >= 64u) { s = _str.substr(s, 0u, 64u); } + ret s; } // Type folds |