libsyntax: fix for has_test_signature
This commit is contained in:
parent
5d2056a7e3
commit
3dbac7882e
1 changed files with 2 additions and 0 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue