File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -64,10 +64,9 @@ pub fn attribute_itest(input_item: venial::Item) -> ParseResult<TokenStream> {
64
64
quote ! { __unused_context: & crate :: framework:: TestContext }
65
65
} ;
66
66
67
+ let return_ty = func. return_ty . as_ref ( ) ;
67
68
if is_async
68
- && func
69
- . return_ty
70
- . as_ref ( )
69
+ && return_ty
71
70
. and_then ( extract_typename)
72
71
. is_none_or ( |segment| segment. ident != "TaskHandle" )
73
72
{
@@ -78,7 +77,8 @@ pub fn attribute_itest(input_item: venial::Item) -> ParseResult<TokenStream> {
78
77
79
78
let ( return_tokens, test_case_ty, plugin_name) ;
80
79
if is_async {
81
- return_tokens = quote ! { -> TaskHandle } ;
80
+ let [ arrow, arrow_head] = func. tk_return_arrow . unwrap ( ) ;
81
+ return_tokens = quote ! { #arrow #arrow_head #return_ty } ; // retain span.
82
82
test_case_ty = quote ! { crate :: framework:: AsyncRustTestCase } ;
83
83
plugin_name = ident ( "__GODOT_ASYNC_ITEST" ) ;
84
84
} else {
You can’t perform that action at this time.
0 commit comments