Skip to content

Commit 4358bf8

Browse files
committed
simplify and uncomment item-fn-arg hygiene unit test
1 parent 5d5c206 commit 4358bf8

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

src/libsyntax/ext/expand.rs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,7 +1172,6 @@ mod test {
11721172
name_finder.ident_accumulator
11731173
}
11741174

1175-
11761175
//fn expand_and_resolve(crate_str: @str) -> ast::crate {
11771176
//let expanded_ast = expand_crate_str(crate_str);
11781177
// println!("expanded: {:?}\n",expanded_ast);
@@ -1299,17 +1298,15 @@ mod test {
12991298
// can't write this test case until we have macro-generating macros.
13001299

13011300
// FIXME #9383 : lambda var hygiene
1302-
// interesting... can't even write this test, yet, because the name-finder
1303-
// only finds pattern vars. Time to upgrade test framework.
1304-
/*#[test]
1301+
// expands to fn q(x_1:int){fn g(x_2:int){x_2 + x_1};}
1302+
#[test]
13051303
fn issue_9383(){
13061304
run_renaming_test(
1307-
&("macro_rules! bad_macro (($ex:expr) => ({(|_x| { $ex }) (9) }))
1308-
fn takes_x(_x : int) { assert_eq!(bad_macro!(_x),8); }
1309-
fn main() { takes_x(8); }",
1310-
vec!(vec!()),false),
1305+
&("macro_rules! bad_macro (($ex:expr) => (fn g(x:int){ x + $ex }))
1306+
fn q(x:int) { bad_macro!(x); }",
1307+
vec!(vec!(1),vec!(0)),true),
13111308
0)
1312-
}*/
1309+
}
13131310

13141311
// run one of the renaming tests
13151312
fn run_renaming_test(t: &RenamingTest, test_idx: uint) {

0 commit comments

Comments
 (0)