Skip to content

Commit 1448fc1

Browse files
committed
rustc: Lower the size limit on ty_to_short_str() and always call it in favor of direct calls to metadata.Encode.ty_str() in trans
1 parent 404db4d commit 1448fc1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/comp/middle/trans.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ fn mangle_name_by_type(@crate_ctxt ccx, vec[str] path, ty.t t) -> str {
210210
fn mangle_name_by_type_only(@crate_ctxt ccx, ty.t t, str name) -> str {
211211
auto f = metadata.def_to_str;
212212
auto cx = @rec(ds=f, tcx=ccx.tcx, abbrevs=metadata.ac_no_abbrevs);
213-
auto s = metadata.Encode.ty_str(cx, t);
213+
auto s = ty.ty_to_short_str(ccx.tcx, t);
214214

215215
auto hash = get_type_sha1(ccx, t);
216216
ret sep() + "rust" + sep() + hash + sep() + name + "_" + s;

src/comp/middle/ty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ fn ty_to_short_str(ctxt cx, t typ) -> str {
661661
auto f = def_to_str;
662662
auto ecx = @rec(ds=f, tcx=cx, abbrevs=metadata.ac_no_abbrevs);
663663
auto s = metadata.Encode.ty_str(ecx, typ);
664-
if (Str.byte_len(s) >= 64u) { s = Str.substr(s, 0u, 64u); }
664+
if (Str.byte_len(s) >= 32u) { s = Str.substr(s, 0u, 32u); }
665665
ret s;
666666
}
667667

0 commit comments

Comments
 (0)