From 7eda4a567d30ecadc3f6bfa17e2911594ad6b1fa Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Mon, 3 Dec 2012 17:08:52 -0800 Subject: [PATCH] librustdoc: Parenthesize closure calls in tests to attempt to put out burning tinderbox. rs=rustbot --- src/librustdoc/desc_to_brief_pass.rs | 2 +- src/librustdoc/markdown_index_pass.rs | 6 +++--- src/librustdoc/markdown_pass.rs | 22 +++++++++++----------- src/librustdoc/markdown_writer.rs | 2 +- src/librustdoc/sectionalize_pass.rs | 2 +- src/librustdoc/sort_item_name_pass.rs | 2 +- src/librustdoc/sort_item_type_pass.rs | 2 +- src/librustdoc/sort_pass.rs | 6 +++--- src/librustdoc/text_pass.rs | 8 ++++---- src/librustdoc/trim_pass.rs | 4 ++-- 10 files changed, 28 insertions(+), 28 deletions(-) diff --git a/src/librustdoc/desc_to_brief_pass.rs b/src/librustdoc/desc_to_brief_pass.rs index b44efdfaf2495..62a83f6a520b8 100644 --- a/src/librustdoc/desc_to_brief_pass.rs +++ b/src/librustdoc/desc_to_brief_pass.rs @@ -85,7 +85,7 @@ mod test { fn mk_doc(source: ~str) -> doc::Doc { do astsrv::from_str(source) |srv| { let doc = extract::from_srv(srv, ~""); - let doc = attr_pass::mk_pass().f(srv, doc); + let doc = (attr_pass::mk_pass().f)(srv, doc); run(srv, doc) } } diff --git a/src/librustdoc/markdown_index_pass.rs b/src/librustdoc/markdown_index_pass.rs index 07120440c9a29..65f3a9f7d7fb7 100644 --- a/src/librustdoc/markdown_index_pass.rs +++ b/src/librustdoc/markdown_index_pass.rs @@ -239,9 +239,9 @@ mod test { .. config::default_config(&Path("whatever")) }; let doc = extract::from_srv(srv, ~""); - let doc = attr_pass::mk_pass().f(srv, doc); - let doc = desc_to_brief_pass::mk_pass().f(srv, doc); - let doc = path_pass::mk_pass().f(srv, doc); + let doc = (attr_pass::mk_pass().f)(srv, doc); + let doc = (desc_to_brief_pass::mk_pass().f)(srv, doc); + let doc = (path_pass::mk_pass().f)(srv, doc); run(srv, doc, config) } } diff --git a/src/librustdoc/markdown_pass.rs b/src/librustdoc/markdown_pass.rs index 0ba69a31b1eb7..618e92bc046a0 100644 --- a/src/librustdoc/markdown_pass.rs +++ b/src/librustdoc/markdown_pass.rs @@ -115,7 +115,7 @@ fn should_request_new_writer_for_each_page() { let (writer_factory, po) = markdown_writer::future_writer_factory(); let (srv, doc) = test::create_doc_srv(~"mod a { }"); // Split the document up into pages - let doc = page_pass::mk_pass(config::DocPerMod).f(srv, doc); + let doc = (page_pass::mk_pass(config::DocPerMod).f)(srv, doc); write_markdown(doc, move writer_factory); // We expect two pages to have been written for iter::repeat(2) { @@ -147,7 +147,7 @@ fn should_write_title_for_each_page() { let (writer_factory, po) = markdown_writer::future_writer_factory(); let (srv, doc) = test::create_doc_srv( ~"#[link(name = \"core\")]; mod a { }"); - let doc = page_pass::mk_pass(config::DocPerMod).f(srv, doc); + let doc = (page_pass::mk_pass(config::DocPerMod).f)(srv, doc); write_markdown(doc, move writer_factory); for iter::repeat(2) { let (page, markdown) = comm::recv(po); @@ -814,21 +814,21 @@ mod test { let doc = extract::from_srv(srv, ~""); debug!("doc (extract): %?", doc); - let doc = tystr_pass::mk_pass().f(srv, doc); + let doc = (tystr_pass::mk_pass().f)(srv, doc); debug!("doc (tystr): %?", doc); - let doc = path_pass::mk_pass().f(srv, doc); + let doc = (path_pass::mk_pass().f)(srv, doc); debug!("doc (path): %?", doc); - let doc = attr_pass::mk_pass().f(srv, doc); + let doc = (attr_pass::mk_pass().f)(srv, doc); debug!("doc (attr): %?", doc); - let doc = desc_to_brief_pass::mk_pass().f(srv, doc); + let doc = (desc_to_brief_pass::mk_pass().f)(srv, doc); debug!("doc (desc_to_brief): %?", doc); - let doc = unindent_pass::mk_pass().f(srv, doc); + let doc = (unindent_pass::mk_pass().f)(srv, doc); debug!("doc (unindent): %?", doc); - let doc = sectionalize_pass::mk_pass().f(srv, doc); + let doc = (sectionalize_pass::mk_pass().f)(srv, doc); debug!("doc (trim): %?", doc); - let doc = trim_pass::mk_pass().f(srv, doc); + let doc = (trim_pass::mk_pass().f)(srv, doc); debug!("doc (sectionalize): %?", doc); - let doc = markdown_index_pass::mk_pass(config).f(srv, doc); + let doc = (markdown_index_pass::mk_pass(config).f)(srv, doc); debug!("doc (index): %?", doc); (srv, doc) } @@ -853,7 +853,7 @@ mod test { ) -> ~str { let (writer_factory, po) = markdown_writer::future_writer_factory(); let pass = mk_pass(move writer_factory); - pass.f(srv, doc); + (pass.f)(srv, doc); return comm::recv(po).second(); } diff --git a/src/librustdoc/markdown_writer.rs b/src/librustdoc/markdown_writer.rs index 7f4962cf1b7c6..4dfba8c29bad6 100644 --- a/src/librustdoc/markdown_writer.rs +++ b/src/librustdoc/markdown_writer.rs @@ -247,7 +247,7 @@ mod test { fn mk_doc(+name: ~str, +source: ~str) -> doc::Doc { do astsrv::from_str(source) |srv| { let doc = extract::from_srv(srv, name); - let doc = path_pass::mk_pass().f(srv, doc); + let doc = (path_pass::mk_pass().f)(srv, doc); doc } } diff --git a/src/librustdoc/sectionalize_pass.rs b/src/librustdoc/sectionalize_pass.rs index 56db1cf5730fa..8bd761df53338 100644 --- a/src/librustdoc/sectionalize_pass.rs +++ b/src/librustdoc/sectionalize_pass.rs @@ -234,7 +234,7 @@ mod test { fn mk_doc(source: ~str) -> doc::Doc { do astsrv::from_str(source) |srv| { let doc = extract::from_srv(srv, ~""); - let doc = attr_pass::mk_pass().f(srv, doc); + let doc = (attr_pass::mk_pass().f)(srv, doc); run(srv, doc) } } diff --git a/src/librustdoc/sort_item_name_pass.rs b/src/librustdoc/sort_item_name_pass.rs index 7947eef9c34ca..767468293bb0f 100644 --- a/src/librustdoc/sort_item_name_pass.rs +++ b/src/librustdoc/sort_item_name_pass.rs @@ -14,7 +14,7 @@ fn test() { let source = ~"mod z { } fn y() { }"; do astsrv::from_str(source) |srv| { let doc = extract::from_srv(srv, ~""); - let doc = mk_pass().f(srv, doc); + let doc = (mk_pass().f)(srv, doc); assert doc.cratemod().items[0].name() == ~"y"; assert doc.cratemod().items[1].name() == ~"z"; } diff --git a/src/librustdoc/sort_item_type_pass.rs b/src/librustdoc/sort_item_type_pass.rs index 836485de0832a..0bc6c1accdd48 100644 --- a/src/librustdoc/sort_item_type_pass.rs +++ b/src/librustdoc/sort_item_type_pass.rs @@ -39,7 +39,7 @@ fn test() { struct istruct { f: () }"; do astsrv::from_str(source) |srv| { let doc = extract::from_srv(srv, ~""); - let doc = mk_pass().f(srv, doc); + let doc = (mk_pass().f)(srv, doc); assert doc.cratemod().items[0].name() == ~"iconst"; assert doc.cratemod().items[1].name() == ~"itype"; assert doc.cratemod().items[2].name() == ~"ienum"; diff --git a/src/librustdoc/sort_pass.rs b/src/librustdoc/sort_pass.rs index 362842f783276..3fa7ff6d8a6be 100644 --- a/src/librustdoc/sort_pass.rs +++ b/src/librustdoc/sort_pass.rs @@ -51,7 +51,7 @@ fn test() { let source = ~"mod z { mod y { } fn x() { } } mod w { }"; do astsrv::from_str(source) |srv| { let doc = extract::from_srv(srv, ~""); - let doc = mk_pass(~"", name_lteq).f(srv, doc); + let doc = (mk_pass(~"", name_lteq).f)(srv, doc); assert doc.cratemod().mods()[0].name() == ~"w"; assert doc.cratemod().mods()[1].items[0].name() == ~"x"; assert doc.cratemod().mods()[1].items[1].name() == ~"y"; @@ -68,10 +68,10 @@ fn should_be_stable() { let source = ~"mod a { mod b { } } mod c { mod d { } }"; do astsrv::from_str(source) |srv| { let doc = extract::from_srv(srv, ~""); - let doc = mk_pass(~"", always_eq).f(srv, doc); + let doc = (mk_pass(~"", always_eq).f)(srv, doc); assert doc.cratemod().mods()[0].items[0].name() == ~"b"; assert doc.cratemod().mods()[1].items[0].name() == ~"d"; - let doc = mk_pass(~"", always_eq).f(srv, doc); + let doc = (mk_pass(~"", always_eq).f)(srv, doc); assert doc.cratemod().mods()[0].items[0].name() == ~"b"; assert doc.cratemod().mods()[1].items[0].name() == ~"d"; } diff --git a/src/librustdoc/text_pass.rs b/src/librustdoc/text_pass.rs index 4a090bab9baf6..6493caeebe60d 100644 --- a/src/librustdoc/text_pass.rs +++ b/src/librustdoc/text_pass.rs @@ -276,10 +276,10 @@ mod test { fn mk_doc(source: ~str) -> doc::Doc { do astsrv::from_str(source) |srv| { let doc = extract::from_srv(srv, ~""); - let doc = attr_pass::mk_pass().f(srv, doc); - let doc = desc_to_brief_pass::mk_pass().f(srv, doc); - let doc = sectionalize_pass::mk_pass().f(srv, doc); - mk_pass(~"", |s| str::trim(s) ).f(srv, doc) + let doc = (attr_pass::mk_pass().f)(srv, doc); + let doc = (desc_to_brief_pass::mk_pass().f)(srv, doc); + let doc = (sectionalize_pass::mk_pass().f)(srv, doc); + (mk_pass(~"", |s| str::trim(s) ).f)(srv, doc) } } } diff --git a/src/librustdoc/trim_pass.rs b/src/librustdoc/trim_pass.rs index 82276bcdb75f5..58bf52f9a4a3a 100644 --- a/src/librustdoc/trim_pass.rs +++ b/src/librustdoc/trim_pass.rs @@ -25,8 +25,8 @@ mod test { fn mk_doc(source: ~str) -> doc::Doc { do astsrv::from_str(source) |srv| { let doc = extract::from_srv(srv, ~""); - let doc = attr_pass::mk_pass().f(srv, doc); - mk_pass().f(srv, doc) + let doc = (attr_pass::mk_pass().f)(srv, doc); + (mk_pass().f)(srv, doc) } } }