fix: add back lifetime (#5507)

closed #5506
This commit is contained in:
IWANABETHATGUY 2024-09-05 17:47:58 +00:00
parent d9a1b610a7
commit b96bea4f0d
2 changed files with 171 additions and 169 deletions

File diff suppressed because it is too large Load diff

View file

@ -162,7 +162,7 @@ impl Generator for AstKindGenerator {
format_ident!("as_{}", ident.to_string().to_case(Case::Snake));
parse_quote!(
///@@line_break
pub fn #snake_case_name(&self) -> Option<&#typ> {
pub fn #snake_case_name(&self) -> Option<&'a #typ> {
if let Self::#ident(v) = self {
Some(*v)
} else {