libsyntax: fix for has_test_signature

This commit is contained in:
blackbeam 2015-01-22 12:29:49 +03:00
parent 5d2056a7e3
commit 3dbac7882e

View file

@ -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()
@ -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();