diff options
| author | John Clements <clements@racket-lang.org> | 2014-06-30 12:42:33 -0700 |
|---|---|---|
| committer | John Clements <clements@racket-lang.org> | 2014-07-03 17:32:35 -0700 |
| commit | 4358bf8bfa1bfc853b51c29d48a2d57eb8dfee0a (patch) | |
| tree | cb4e12f8fd1fae8e9a63d4c00bb3fb1d25cc2405 /src/libsyntax | |
| parent | 5d5c20647f45f2eb74f337e5434bbe63b0c43345 (diff) | |
| download | rust-4358bf8bfa1bfc853b51c29d48a2d57eb8dfee0a.tar.gz rust-4358bf8bfa1bfc853b51c29d48a2d57eb8dfee0a.zip | |
simplify and uncomment item-fn-arg hygiene unit test
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ext/expand.rs | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs index c3413293e52..253102ba5de 100644 --- a/src/libsyntax/ext/expand.rs +++ b/src/libsyntax/ext/expand.rs @@ -1172,7 +1172,6 @@ mod test { name_finder.ident_accumulator } - //fn expand_and_resolve(crate_str: @str) -> ast::crate { //let expanded_ast = expand_crate_str(crate_str); // println!("expanded: {:?}\n",expanded_ast); @@ -1299,17 +1298,15 @@ mod test { // can't write this test case until we have macro-generating macros. // FIXME #9383 : lambda var hygiene - // interesting... can't even write this test, yet, because the name-finder - // only finds pattern vars. Time to upgrade test framework. - /*#[test] + // expands to fn q(x_1:int){fn g(x_2:int){x_2 + x_1};} + #[test] fn issue_9383(){ run_renaming_test( - &("macro_rules! bad_macro (($ex:expr) => ({(|_x| { $ex }) (9) })) - fn takes_x(_x : int) { assert_eq!(bad_macro!(_x),8); } - fn main() { takes_x(8); }", - vec!(vec!()),false), + &("macro_rules! bad_macro (($ex:expr) => (fn g(x:int){ x + $ex })) + fn q(x:int) { bad_macro!(x); }", + vec!(vec!(1),vec!(0)),true), 0) - }*/ + } // run one of the renaming tests fn run_renaming_test(t: &RenamingTest, test_idx: uint) { |
