Skip to content

Commit eff975f

Browse files
committed
---
yaml --- r: 79333 b: refs/heads/try c: 4ca981e h: refs/heads/master i: 79331: fd6636d v: v3
1 parent 78770c0 commit eff975f

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 3e6de6b7da8ee88bf84b0e217900051334be08da
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 60fba4d7d677ec098e6a43014132fe99f7547363
5-
refs/heads/try: 9d5f124344b08521ebaff9e251eed8b948322bbc
5+
refs/heads/try: 4ca981e3fc4d6f537b5afe7662e73dd374d2b700
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/libsyntax/parse/token.rs

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -543,18 +543,9 @@ pub fn gensym_ident(str : &str) -> ast::Ident {
543543
ast::Ident::new(gensym(str))
544544
}
545545

546-
547-
// create a fresh name. In principle, this is just a
548-
// gensym, but for debugging purposes, you'd like the
549-
// resulting name to have a suggestive stringify, without
550-
// paying the cost of guaranteeing that the name is
551-
// truly unique. I'm going to try to strike a balance
552-
// by using a gensym with a name that has a random number
553-
// at the end. So, the gensym guarantees the uniqueness,
554-
// and the int helps to avoid confusion.
555-
pub fn fresh_name(src_name : &ast::Ident) -> Name {
556-
let num = rand::rng().gen_uint_range(0,0xffff);
557-
gensym(fmt!("%s_%u",ident_to_str(src_name),num))
546+
// create a fresh name that maps to the same string as the old one.
547+
pub fn fresh_name(src : &ast::Ident) -> Name {
548+
gensym(ident_to_str(src))
558549
}
559550

560551
// create a fresh mark.

0 commit comments

Comments
 (0)