From 7fb78bb640a7c6d4e862b30d685f2e2176c97cce Mon Sep 17 00:00:00 2001 From: 82marbag <69267416+82marbag@users.noreply.github.com> Date: Mon, 30 Oct 2023 09:34:31 +0000 Subject: [PATCH] Add lifetimes in structure impl (#3106) ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._ Signed-off-by: Daniele Ahmed --- .../rust/codegen/core/smithy/generators/StructureGenerator.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/smithy/generators/StructureGenerator.kt b/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/smithy/generators/StructureGenerator.kt index cd1854709..5c9635c5a 100644 --- a/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/smithy/generators/StructureGenerator.kt +++ b/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/smithy/generators/StructureGenerator.kt @@ -133,7 +133,8 @@ open class StructureGenerator( if (accessorMembers.isEmpty()) { return } - writer.rustBlock("impl $name") { + val lifetimes = lifetimeDeclaration() + writer.rustBlock("impl $lifetimes $name $lifetimes") { // Render field accessor methods forEachMember(accessorMembers) { member, memberName, memberSymbol -> val memberType = memberSymbol.rustType() -- GitLab