@@ -332,7 +332,7 @@ fn is_test_fn(cx: &TestCtxt, i: &ast::Item) -> bool {
332
332
ast:: ItemKind :: Fn ( ref decl, _, _, _, ref generics, _) => {
333
333
// If the termination trait is active, the compiler will check that the output
334
334
// type implements the `Termination` trait as `libtest` enforces that.
335
- let output_matches = if cx. features . termination_trait {
335
+ let output_matches = if cx. features . termination_trait_test {
336
336
true
337
337
} else {
338
338
let no_output = match decl. output {
@@ -359,7 +359,7 @@ fn is_test_fn(cx: &TestCtxt, i: &ast::Item) -> bool {
359
359
match has_test_signature ( cx, i) {
360
360
Yes => true ,
361
361
No => {
362
- if cx. features . termination_trait {
362
+ if cx. features . termination_trait_test {
363
363
diag. span_err ( i. span , "functions used as tests can not have any arguments" ) ;
364
364
} else {
365
365
diag. span_err ( i. span , "functions used as tests must have signature fn() -> ()" ) ;
@@ -388,7 +388,7 @@ fn is_bench_fn(cx: &TestCtxt, i: &ast::Item) -> bool {
388
388
389
389
// If the termination trait is active, the compiler will check that the output
390
390
// type implements the `Termination` trait as `libtest` enforces that.
391
- let output_matches = if cx. features . termination_trait {
391
+ let output_matches = if cx. features . termination_trait_test {
392
392
true
393
393
} else {
394
394
let no_output = match decl. output {
@@ -416,7 +416,7 @@ fn is_bench_fn(cx: &TestCtxt, i: &ast::Item) -> bool {
416
416
if has_bench_attr && !has_bench_signature {
417
417
let diag = cx. span_diagnostic ;
418
418
419
- if cx. features . termination_trait {
419
+ if cx. features . termination_trait_test {
420
420
diag. span_err ( i. span , "functions used as benches must have signature \
421
421
`fn(&mut Bencher) -> impl Termination`") ;
422
422
} else {
0 commit comments