diff options
| author | James Miller <bladeon@gmail.com> | 2013-07-07 10:59:27 +1200 |
|---|---|---|
| committer | James Miller <bladeon@gmail.com> | 2013-07-07 22:51:10 +1200 |
| commit | 1fd735d3c1d7aaa9e026ce74ea341a291fce91fd (patch) | |
| tree | 472586b4e35fa515691fd3bdc43758edf081eab6 /src/libsyntax | |
| parent | fb19205b1bfd565ca11132eb7deb64e0338d5ecd (diff) | |
| download | rust-1fd735d3c1d7aaa9e026ce74ea341a291fce91fd.tar.gz rust-1fd735d3c1d7aaa9e026ce74ea341a291fce91fd.zip | |
Fix broken tests
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/fold.rs | 6 | ||||
| -rw-r--r-- | src/libsyntax/parse/mod.rs | 10 | ||||
| -rw-r--r-- | src/libsyntax/print/pprust.rs | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/src/libsyntax/fold.rs b/src/libsyntax/fold.rs index e2beebcead2..c36b717ea00 100644 --- a/src/libsyntax/fold.rs +++ b/src/libsyntax/fold.rs @@ -964,7 +964,7 @@ mod test { } // this version doesn't care about getting comments or docstrings in. - fn fake_print_crate(s: @pprust::ps, crate: ast::crate) { + fn fake_print_crate(s: @pprust::ps, crate: &ast::crate) { pprust::print_mod(s, &crate.node.module, crate.node.attrs); } @@ -995,7 +995,7 @@ mod test { let ast = string_to_crate(@"#[a] mod b {fn c (d : e, f : g) {h!(i,j,k);l;m}}"); assert_pred!(matches_codepattern, "matches_codepattern", - pprust::to_str(zz_fold.fold_crate(ast),fake_print_crate, + pprust::to_str(&zz_fold.fold_crate(ast),fake_print_crate, token::get_ident_interner()), ~"#[a]mod zz{fn zz(zz:zz,zz:zz){zz!(zz,zz,zz);zz;zz}}"); } @@ -1007,7 +1007,7 @@ mod test { => (g $(d $d $e)+))} "); assert_pred!(matches_codepattern, "matches_codepattern", - pprust::to_str(zz_fold.fold_crate(ast),fake_print_crate, + pprust::to_str(&zz_fold.fold_crate(ast),fake_print_crate, token::get_ident_interner()), ~"zz!zz((zz$zz:zz$(zz $zz:zz)zz+=>(zz$(zz$zz$zz)+)))"); } diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs index 634efbe165d..fdf3f0e639e 100644 --- a/src/libsyntax/parse/mod.rs +++ b/src/libsyntax/parse/mod.rs @@ -482,7 +482,7 @@ mod test { assert_eq!(parser.parse_arg_general(true), ast::arg{ is_mutbl: false, - ty: @ast::Ty{id:3, // fixme + ty: ast::Ty{id:3, // fixme node: ast::ty_path(ast::Path{ span:sp(4,4), // this is bizarre... // check this in the original parser? @@ -490,7 +490,7 @@ mod test { idents:~[str_to_ident("int")], rp: None, types: ~[]}, - @None, 2), + None, 2), span:sp(4,7)}, pat: @ast::pat{id:1, node: ast::pat_ident(ast::bind_infer, @@ -519,14 +519,14 @@ mod test { node: ast::item_fn(ast::fn_decl{ inputs: ~[ast::arg{ is_mutbl: false, - ty: @ast::Ty{id:3, // fixme + ty: ast::Ty{id:3, // fixme node: ast::ty_path(ast::Path{ span:sp(10,13), global:false, idents:~[str_to_ident("int")], rp: None, types: ~[]}, - @None, 2), + None, 2), span:sp(10,13)}, pat: @ast::pat{id:1, // fixme node: ast::pat_ident( @@ -542,7 +542,7 @@ mod test { span: sp(6,7)}, id: 4 // fixme }], - output: @ast::Ty{id:5, // fixme + output: ast::Ty{id:5, // fixme node: ast::ty_nil, span:sp(15,15)}, // not sure cf: ast::return_val diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index 517065ab1b5..b545c56778e 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -2272,7 +2272,7 @@ mod test { let decl = ast::fn_decl { inputs: ~[], - output: @ast::Ty {id: 0, + output: ast::Ty {id: 0, node: ast::ty_nil, span: codemap::dummy_sp()}, cf: ast::return_val |
