File tree Expand file tree Collapse file tree 2 files changed +1
-18
lines changed
branches/dist-snap/src/libsyntax Expand file tree Collapse file tree 2 files changed +1
-18
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ refs/heads/try: 457a3c991d79b971be07fce75f9d0c12848fb37c
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
8
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9
- refs/heads/dist-snap: 351a5fd2b40c2be90f94fe2580903e93353b95ee
9
+ refs/heads/dist-snap: 268f6c56c219e97b444d78dadc387cc549e27aa6
10
10
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
11
11
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
12
12
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
Original file line number Diff line number Diff line change @@ -391,23 +391,6 @@ fn fold_arg_<T: Folder>(a: &Arg, fld: &mut T) -> Arg {
391
391
392
392
// build a new vector of tts by appling the Folder's fold_ident to
393
393
// all of the identifiers in the token trees.
394
- //
395
- // This is part of hygiene magic. As far as hygiene is concerned, there
396
- // are three types of let pattern bindings or loop labels:
397
- // - those defined and used in non-macro part of the program
398
- // - those used as part of macro invocation arguments
399
- // - those defined and used inside macro definitions
400
- // Lexically, type 1 and 2 are in one group and type 3 the other. If they
401
- // clash, in order for let and loop label to work hygienically, one group
402
- // or the other needs to be renamed. The problem is that type 2 and 3 are
403
- // parsed together (inside the macro expand function). After being parsed and
404
- // AST being constructed, they can no longer be distinguished from each other.
405
- //
406
- // For that reason, type 2 let bindings and loop labels are actually renamed
407
- // in the form of tokens instead of AST nodes, here. There are wasted effort
408
- // since many token::IDENT are not necessary part of let bindings and most
409
- // token::LIFETIME are certainly not loop labels. But we can't tell in their
410
- // token form. So this is less ideal and hacky but it works.
411
394
pub fn fold_tts < T : Folder > ( tts : & [ TokenTree ] , fld : & mut T ) -> Vec < TokenTree > {
412
395
tts. iter ( ) . map ( |tt| {
413
396
match * tt {
You can’t perform that action at this time.
0 commit comments