Skip to content

Commit ad10a58

Browse files
committed
---
yaml --- r: 3684 b: refs/heads/master c: 73963ea h: refs/heads/master v: v3
1 parent 2cf09d3 commit ad10a58

File tree

4 files changed

+7
-11
lines changed

4 files changed

+7
-11
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 4304f8d4f6d9e4e7a7877baabd93b8895fb809b2
2+
refs/heads/master: 73963eae9a37d16bab872f3ffc9bdcc1b4567c00

trunk/src/comp/back/link.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -401,17 +401,13 @@ fn symbol_hash(ty::ctxt tcx, sha1 sha, &ty::t t,
401401
// NB: do *not* use abbrevs here as we want the symbol names
402402
// to be independent of one another in the crate.
403403

404-
auto cx =
405-
@rec(ds=metadata::encoder::def_to_str,
406-
tcx=tcx,
407-
abbrevs=metadata::tyencode::ac_no_abbrevs);
408404
sha.reset();
409405
sha.input_str(link_meta.name);
410406
sha.input_str("-");
411407
// FIXME: This wants to be link_meta.meta_hash
412408
sha.input_str(link_meta.name);
413409
sha.input_str("-");
414-
sha.input_str(metadata::tyencode::ty_str(cx, t));
410+
sha.input_str(metadata::tyencode::ty_str(tcx, t));
415411
auto hash = truncated_sha1_result(sha);
416412
// Prefix with _ so that it never blends into adjacent digits
417413

trunk/src/comp/metadata/tyencode.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,10 @@ fn cx_uses_abbrevs(&@ctxt cx) -> bool {
3636
case (ac_use_abbrevs(_)) { ret true; }
3737
}
3838
}
39-
fn ty_str(&@ctxt cx, &ty::t t) -> str {
40-
assert (!cx_uses_abbrevs(cx));
39+
fn ty_str(&ty::ctxt tcx, &ty::t t) -> str {
40+
auto cx = @rec(ds = encoder::def_to_str,
41+
tcx = tcx,
42+
abbrevs = metadata::tyencode::ac_no_abbrevs);
4143
auto sw = io::string_writer();
4244
enc_ty(sw.get_writer(), cx, t);
4345
ret sw.get_str();

trunk/src/comp/util/ppaux.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,7 @@ fn ty_to_str(&ctxt cx, &t typ) -> str {
151151
}
152152

153153
fn ty_to_short_str(&ctxt cx, t typ) -> str {
154-
auto f = metadata::encoder::def_to_str;
155-
auto ecx = @rec(ds=f, tcx=cx, abbrevs=metadata::tyencode::ac_no_abbrevs);
156-
auto s = metadata::tyencode::ty_str(ecx, typ);
154+
auto s = metadata::tyencode::ty_str(cx, typ);
157155
if (str::byte_len(s) >= 32u) { s = str::substr(s, 0u, 32u); }
158156
ret s;
159157
}

0 commit comments

Comments
 (0)