Fix generic with impl trait. (#2589)

This commit is contained in:
Kaede Hoshikawa 2022-04-07 23:45:26 +09:00 committed by GitHub
parent 2f3b90ce2c
commit 6d07ba3b90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -141,7 +141,7 @@ pub fn hook_impl(hook: HookFn) -> syn::Result<TokenStream> {
quote! {
let #boxed_inner_ident = ::std::boxed::Box::new(
move |#ctx_ident: &mut ::yew::functional::HookContext| #inner_fn_rt {
#inner_fn_ident #call_generics (#ctx_ident, #(#input_args,)*)
#inner_fn_ident (#ctx_ident, #(#input_args,)*)
}
) as #boxed_fn_type;

View File

@ -6,4 +6,7 @@ fn use_some_string(a: impl ::std::convert::Into<::std::string::String>) -> ::std
a.into()
}
#[::yew::prelude::hook]
fn use_impl_fn<T, U>(_callback: impl ::std::prelude::rust_2021::Fn(&T) -> &U) {}
fn main() {}