From 1e5e84cf6d50c9761ef59f31caf17f9795f93522 Mon Sep 17 00:00:00 2001 From: Samuel Moelius Date: Sat, 14 Dec 2024 20:53:39 +0000 Subject: [PATCH] Fixes two `elided_named_lifetimes` warnings Signed-off-by: Samuel Moelius --- src/emit/mod.rs | 2 +- src/sema/builtin_structs.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/emit/mod.rs b/src/emit/mod.rs index 1dbc42aee..adda7fa43 100644 --- a/src/emit/mod.rs +++ b/src/emit/mod.rs @@ -372,7 +372,7 @@ impl ast::Contract { context: &'a inkwell::context::Context, opt: &'a Options, contract_no: usize, - ) -> binary::Binary { + ) -> binary::Binary<'a> { binary::Binary::build(context, self, ns, opt, contract_no) } diff --git a/src/sema/builtin_structs.rs b/src/sema/builtin_structs.rs index 3ab24525f..ecb90075a 100644 --- a/src/sema/builtin_structs.rs +++ b/src/sema/builtin_structs.rs @@ -240,7 +240,7 @@ pub static BUILTIN_STRUCTS: Lazy<[BuiltinStructDeclaration; 3]> = Lazy::new(|| { }); impl StructType { - pub fn definition<'a>(&'a self, ns: &'a Namespace) -> &StructDecl { + pub fn definition<'a>(&'a self, ns: &'a Namespace) -> &'a StructDecl { match self { StructType::UserDefined(struct_no) => &ns.structs[*struct_no], StructType::AccountInfo => &BUILTIN_STRUCTS[0].struct_decl,