Skip to content

Commit 3dbac78

Browse files
committed
libsyntax: fix for has_test_signature
1 parent 5d2056a commit 3dbac78

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/libsyntax/test.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,7 @@ fn is_test_fn(cx: &TestCtxt, i: &ast::Item) -> bool {
295295
&ast::ItemFn(ref decl, _, _, ref generics, _) => {
296296
let no_output = match decl.output {
297297
ast::DefaultReturn(..) => true,
298+
ast::Return(ref t) if t.node == ast::TyTup(vec![]) => true,
298299
_ => false
299300
};
300301
if decl.inputs.is_empty()
@@ -331,6 +332,7 @@ fn is_bench_fn(cx: &TestCtxt, i: &ast::Item) -> bool {
331332
let input_cnt = decl.inputs.len();
332333
let no_output = match decl.output {
333334
ast::DefaultReturn(..) => true,
335+
ast::Return(ref t) if t.node == ast::TyTup(vec![]) => true,
334336
_ => false
335337
};
336338
let tparm_cnt = generics.ty_params.len();

0 commit comments

Comments
 (0)