mirror of
https://github.com/yewstack/yew.git
synced 2025-12-08 21:26:25 +00:00
Fix generic with impl trait. (#2589)
This commit is contained in:
parent
2f3b90ce2c
commit
6d07ba3b90
@ -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;
|
||||
|
||||
|
||||
@ -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() {}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user