From 9071ac60b621020c08bc74cd15c363a7780a2230 Mon Sep 17 00:00:00 2001 From: John Clements Date: Fri, 7 Jun 2013 14:53:53 -0700 Subject: re-add debug version --- src/libsyntax/parse/token.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/libsyntax/parse') diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs index 6cdde3708a6..132ad95e639 100644 --- a/src/libsyntax/parse/token.rs +++ b/src/libsyntax/parse/token.rs @@ -546,6 +546,11 @@ pub fn gensym_ident(str : &str) -> ast::Ident { // 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)) + // following: debug version. Could work in final except that it's incompatible with + // good error messages and uses of struct names in ambiguous could-be-binding + // locations. + /*let num = rand::rng().gen_uint_range(0,0xffff); + gensym(fmt!("%s_%u",ident_to_str(src),num))*/ } // create a fresh mark. -- cgit 1.4.1-3-g733a5