summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorJohn Clements <clements@racket-lang.org>2013-06-07 10:41:38 -0700
committerJohn Clements <clements@racket-lang.org>2013-09-06 13:35:08 -0700
commit3965725d51508e185f03bda0ce883f56c1d980e5 (patch)
tree145cd3bf78c18c798f7cf1ddd3255ba99d42f827 /src/libsyntax
parentd1c01734f3a34958333fefb2fe91cea5e753ddd7 (diff)
downloadrust-3965725d51508e185f03bda0ce883f56c1d980e5.tar.gz
rust-3965725d51508e185f03bda0ce883f56c1d980e5.zip
comments
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/ast.rs1
-rw-r--r--src/libsyntax/ext/expand.rs3
2 files changed, 4 insertions, 0 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs
index c7e197ade09..b3fb8859f65 100644
--- a/src/libsyntax/ast.rs
+++ b/src/libsyntax/ast.rs
@@ -98,6 +98,7 @@ pub enum SyntaxContext_ {
     // in the "from" slot. In essence, they're all
     // pointers to a single "rename" event node.
     Rename (Ident,Name,SyntaxContext),
+    // actually, IllegalCtxt may not be necessary.
     IllegalCtxt
 }
 
diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs
index 196e8644cd3..a75238d269b 100644
--- a/src/libsyntax/ext/expand.rs
+++ b/src/libsyntax/ext/expand.rs
@@ -553,6 +553,8 @@ fn expand_non_macro_stmt (exts: SyntaxEnv,
             let expanded_pat = fld.fold_pat(pat);
             // find the pat_idents in the pattern:
             // oh dear heaven... this is going to include the enum names, as well....
+            // ... but that should be okay, as long as the new names are gensyms
+            // for the old ones.
             let idents = @mut ~[];
             let name_finder = new_name_finder(idents);
             name_finder.visit_pat(expanded_pat,());
@@ -1467,6 +1469,7 @@ mod test {
 
     #[test]
     fn automatic_renaming () {
+        // need some other way to test these...
         let teststrs =
             ~[// b & c should get new names throughout, in the expr too:
                 @"fn a() -> int { let b = 13; let c = b; b+c }",