aboutsummaryrefslogtreecommitdiff
path: root/src/comp/middle
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2011-04-26 20:39:33 +0000
committerGraydon Hoare <[email protected]>2011-04-26 20:39:33 +0000
commitbc6e9815379e31ac42b4d9fd2b0e20f708c1cc1c (patch)
treef9ccd0dac288b2751536a6e552ec8e094e2a6739 /src/comp/middle
parentVarious bits of trans lint, nothing major. (diff)
parentrustc: Cap ridiculous type name sizes (diff)
downloadrust-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.rs4
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