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,