Repository: tokio-rs/axum
File: axum-macros/src/debug_handler.rs (Rust)

Code before:
                idx,
                span = span,
            );

            let call_check_fn_body = if takes_self {
                quote_spanned! {span=>
                    Self::#check_fn();
                }
            } else {
                quote_spanned! {span=>
                    #check_fn();
                }
            };

            let check_fn_generics = if must_impl_from_request_parts {
                quote! {}
            } else {
                quote! { <M> }
            };

            let from_request_bound = if must_impl_from_request_parts {
                quote_spanned! { span =>
                    #ty: ::axum::extract::FromRequestParts<#state_ty> + Send
                }
            } else {
                quote_spanned! { span =>
                    #ty: ::axum::extract::FromRequest<#state_ty, #body_ty, M> + Send
                }
            };

            quote_spanned! {span=>
                #[allow(warnings)]
                fn #check_fn #check_fn_generics()
                where
                    #from_request_bound,
                {}

                // we have to call the function to actually trigger a compile error
                // since the function is generic, just defining it is not enough
                #[allow(warnings)]
                fn #call_check_fn()
                {
                    #call_check_fn_body
                }
            }
        })
        .collect::<TokenStream>()
}

fn check_output_impls_into_response(item_fn: &ItemFn) -> TokenStream {
    let ty = match &item_fn.sig.output {

Review comment (suggestion):
```suggestion
                quote_spanned! {span=>
```

Code after:
                    let span = ty.span();

                    if is_self_pat_type(typed) {
                        (span, syn::parse_quote!(Self))
                    } else {
                        (span, ty.clone())
                    }
                }
            };

            let check_fn = format_ident!(
                "__axum_macros_check_{}_{}_from_request_check",
                item_fn.sig.ident,
                idx,
                span = span,
            );

            let call_check_fn = format_ident!(
                "__axum_macros_check_{}_{}_from_request_call_check",
                item_fn.sig.ident,
                idx,
                span = span,
            );

            let call_check_fn_body = if takes_self {
                quote_spanned! {span=>
                    Self::#check_fn();
                }
            } else {
                quote_spanned! {span=>
                    #check_fn();
                }
            };

            let check_fn_generics = if must_impl_from_request_parts {
                quote! {}
            } else {
                quote! { <M> }
            };

            let from_request_bound = if must_impl_from_request_parts {
                quote_spanned! {span=>
                    #ty: ::axum::extract::FromRequestParts<#state_ty> + Send
                }
            } else {
                quote_spanned! {span=>
                    #ty: ::axum::extract::FromRequest<#state_ty, #body_ty, M> + Send
                }
            };

            quote_spanned! {span=>