@@ -202,7 +202,7 @@ use crate::parse::{
202
202
parametrize:: { ParametrizeData , ParametrizeInfo , TestCase } ,
203
203
rstest:: { RsTestAttributes , RsTestInfo } ,
204
204
} ;
205
- use crate :: refident:: { MaybeIdent , RefIdent } ;
205
+ use crate :: refident:: MaybeIdent ;
206
206
use crate :: resolver:: { arg_2_fixture, Resolver } ;
207
207
208
208
// Test utility module
@@ -586,12 +586,13 @@ fn fn_args_has_ident(fn_decl: &ItemFn, ident: &Ident) -> bool {
586
586
587
587
type Errors < ' a > = Box < dyn Iterator < Item =syn:: Error > + ' a > ;
588
588
589
- fn missed_arguments_errors < ' a , I : RefIdent + Spanned + ' a > ( test : & ' a ItemFn , args : impl Iterator < Item =& ' a I > + ' a ) -> Errors < ' a > {
589
+ fn missed_arguments_errors < ' a , I : MaybeIdent + Spanned + ' a > ( test : & ' a ItemFn , args : impl Iterator < Item =& ' a I > + ' a ) -> Errors < ' a > {
590
590
Box :: new (
591
591
args
592
- . filter ( move |& p| !fn_args_has_ident ( test, p. ident ( ) ) )
593
- . map ( |missed| syn:: Error :: new ( missed. span ( ) ,
594
- & format ! ( "Missed argument: '{}' should be a test function argument." , missed. ident( ) ) ,
592
+ . filter_map ( |it| it. maybe_ident ( ) . map ( |ident| ( it, ident) ) )
593
+ . filter ( move |( _, ident) | !fn_args_has_ident ( test, ident) )
594
+ . map ( |( missed, ident) | syn:: Error :: new ( missed. span ( ) ,
595
+ & format ! ( "Missed argument: '{}' should be a test function argument." , ident) ,
595
596
) )
596
597
)
597
598
}
0 commit comments