Remove duplicate definition of def_to_str from middle::ty

This commit is contained in:
Brian Anderson 2011-07-07 12:30:51 -07:00
parent e29ef1bec2
commit 4304f8d4f6
2 changed files with 1 additions and 5 deletions

View file

@ -178,7 +178,6 @@ export type_is_str;
export type_owns_heap_mem; export type_owns_heap_mem;
export type_autoderef; export type_autoderef;
export type_param; export type_param;
export def_to_str;
export unify; export unify;
export variant_info; export variant_info;
export walk_ty; export walk_ty;
@ -1300,9 +1299,6 @@ fn type_autoderef(&ctxt cx, &ty::t t) -> ty::t {
ret t1; ret t1;
} }
fn def_to_str(&ast::def_id did) -> str { ret #fmt("%d:%d", did._0, did._1); }
// Type hashing. This function is private to this module (and slow); external // Type hashing. This function is private to this module (and slow); external
// users should use `hash_ty()` instead. // users should use `hash_ty()` instead.
fn hash_type_structure(&sty st) -> uint { fn hash_type_structure(&sty st) -> uint {

View file

@ -151,7 +151,7 @@ fn ty_to_str(&ctxt cx, &t typ) -> str {
} }
fn ty_to_short_str(&ctxt cx, t typ) -> str { fn ty_to_short_str(&ctxt cx, t typ) -> str {
auto f = def_to_str; auto f = metadata::encoder::def_to_str;
auto ecx = @rec(ds=f, tcx=cx, abbrevs=metadata::tyencode::ac_no_abbrevs); auto ecx = @rec(ds=f, tcx=cx, abbrevs=metadata::tyencode::ac_no_abbrevs);
auto s = metadata::tyencode::ty_str(ecx, typ); auto s = metadata::tyencode::ty_str(ecx, typ);
if (str::byte_len(s) >= 32u) { s = str::substr(s, 0u, 32u); } if (str::byte_len(s) >= 32u) { s = str::substr(s, 0u, 32u); }