File tree Expand file tree Collapse file tree 2 files changed +4
-13
lines changed
branches/try/src/libsyntax/parse Expand file tree Collapse file tree 2 files changed +4
-13
lines changed Original file line number Diff line number Diff line change 2
2
refs/heads/master: 3e6de6b7da8ee88bf84b0e217900051334be08da
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: 60fba4d7d677ec098e6a43014132fe99f7547363
5
- refs/heads/try: 9d5f124344b08521ebaff9e251eed8b948322bbc
5
+ refs/heads/try: 4ca981e3fc4d6f537b5afe7662e73dd374d2b700
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
8
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
Original file line number Diff line number Diff line change @@ -543,18 +543,9 @@ pub fn gensym_ident(str : &str) -> ast::Ident {
543
543
ast:: Ident :: new ( gensym ( str) )
544
544
}
545
545
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) )
558
549
}
559
550
560
551
// create a fresh mark.
You can’t perform that action at this time.
0 commit comments