Skip to content

Commit

Permalink
libsyntax: fix for has_test_signature
Browse files Browse the repository at this point in the history
  • Loading branch information
blackbeam committed Jan 22, 2015
1 parent 5d2056a commit 3dbac78
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/libsyntax/test.rs
Expand Up @@ -295,6 +295,7 @@ fn is_test_fn(cx: &TestCtxt, i: &ast::Item) -> bool {
&ast::ItemFn(ref decl, _, _, ref generics, _) => {
let no_output = match decl.output {
ast::DefaultReturn(..) => true,
ast::Return(ref t) if t.node == ast::TyTup(vec![]) => true,
_ => false
};
if decl.inputs.is_empty()
Expand Down Expand Up @@ -331,6 +332,7 @@ fn is_bench_fn(cx: &TestCtxt, i: &ast::Item) -> bool {
let input_cnt = decl.inputs.len();
let no_output = match decl.output {
ast::DefaultReturn(..) => true,
ast::Return(ref t) if t.node == ast::TyTup(vec![]) => true,
_ => false
};
let tparm_cnt = generics.ty_params.len();
Expand Down

0 comments on commit 3dbac78

Please sign in to comment.