comments
This commit is contained in:
parent
d1c01734f3
commit
3965725d51
@ -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
|
||||
}
|
||||
|
||||
|
@ -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 }",
|
||||
|
Loading…
Reference in New Issue
Block a user