about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/token.rs15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs
index 66f121727af..6cdde3708a6 100644
--- a/src/libsyntax/parse/token.rs
+++ b/src/libsyntax/parse/token.rs
@@ -543,18 +543,9 @@ pub fn gensym_ident(str : &str) -> ast::Ident {
     ast::Ident::new(gensym(str))
 }
 
-
-// create a fresh name. In principle, this is just a
-// gensym, but for debugging purposes, you'd like the
-// resulting name to have a suggestive stringify, without
-// paying the cost of guaranteeing that the name is
-// truly unique.  I'm going to try to strike a balance
-// by using a gensym with a name that has a random number
-// at the end. So, the gensym guarantees the uniqueness,
-// and the int helps to avoid confusion.
-pub fn fresh_name(src_name : &ast::Ident) -> Name {
-    let num = rand::rng().gen_uint_range(0,0xffff);
-    gensym(fmt!("%s_%u",ident_to_str(src_name),num))
+// create a fresh name that maps to the same string as the old one.
+pub fn fresh_name(src : &ast::Ident) -> Name {
+    gensym(ident_to_str(src))
 }
 
 // create a fresh mark.