From 4304f8d4f6d9e4e7a7877baabd93b8895fb809b2 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Thu, 7 Jul 2011 12:30:51 -0700 Subject: [PATCH] Remove duplicate definition of def_to_str from middle::ty --- src/comp/middle/ty.rs | 4 ---- src/comp/util/ppaux.rs | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/comp/middle/ty.rs b/src/comp/middle/ty.rs index 3fcb592e1091..b3d3d9a9013c 100644 --- a/src/comp/middle/ty.rs +++ b/src/comp/middle/ty.rs @@ -178,7 +178,6 @@ export type_is_str; export type_owns_heap_mem; export type_autoderef; export type_param; -export def_to_str; export unify; export variant_info; export walk_ty; @@ -1300,9 +1299,6 @@ fn type_autoderef(&ctxt cx, &ty::t t) -> ty::t { 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 // users should use `hash_ty()` instead. fn hash_type_structure(&sty st) -> uint { diff --git a/src/comp/util/ppaux.rs b/src/comp/util/ppaux.rs index 170a8157a17d..27333dd1a0e3 100644 --- a/src/comp/util/ppaux.rs +++ b/src/comp/util/ppaux.rs @@ -151,7 +151,7 @@ fn ty_to_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 s = metadata::tyencode::ty_str(ecx, typ); if (str::byte_len(s) >= 32u) { s = str::substr(s, 0u, 32u); }