about summary refs log tree commit diff
path: root/src/comp/middle
diff options
context:
space:
mode:
authorGraydon Hoare <graydon@mozilla.com>2011-04-26 20:39:33 +0000
committerGraydon Hoare <graydon@mozilla.com>2011-04-26 20:39:33 +0000
commitbc6e9815379e31ac42b4d9fd2b0e20f708c1cc1c (patch)
treef9ccd0dac288b2751536a6e552ec8e094e2a6739 /src/comp/middle
parent418b23a5389482c2889c5c01f7f31ba5061c5bc5 (diff)
parentba3a4f6cc6a9a29c67b325d8a6a5d3b081f97773 (diff)
downloadrust-bc6e9815379e31ac42b4d9fd2b0e20f708c1cc1c.tar.gz
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 04bea450f7d..24078767f19 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