Merge pull request #272 from DPM97/component_lifetimes

fix component macro lifetime parsing
This commit is contained in:
Greg Johnston 2023-01-08 14:07:00 -05:00 committed by GitHub
commit 70808c5262
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -116,6 +116,7 @@ impl ToTokens for Model {
let body_name = body.sig.ident.clone();
let (_, generics, where_clause) = body.sig.generics.split_for_impl();
let lifetimes = body.sig.generics.lifetimes();
let props_name = format_ident!("{name}Props");
let trace_name = format!("<{name} />");
@ -187,7 +188,7 @@ impl ToTokens for Model {
#[allow(unused_variables)]
#scope_name: Scope,
props: #props_name #generics
) #ret
) #ret #(+ #lifetimes)*
#where_clause
{
#body