When using rust-client-codegen, if you have a shape like:
structure Foo {
meta: Bar
}
The struct member meta: Option<Bar> would conflict with the built in meta: ::aws_smithy_types::error::ErrorMetadata, and so it is correctly substituted as meta_value: Option<Bar>.
(reference:
)
however, the generated setter method on the builder does not get renamed, and so duplicate set_meta methods are added to the impl block.
(reference:
|
fun MemberShape.setterName() = "set_${this.memberName.toSnakeCase()}" |
)
This leads to an invalid crate which will fail to compile with the following error:
error[E0592]: duplicate definitions with name `set_meta`
When using
rust-client-codegen, if you have a shape like:The struct member
meta: Option<Bar>would conflict with the built inmeta: ::aws_smithy_types::error::ErrorMetadata, and so it is correctly substituted asmeta_value: Option<Bar>.(reference:
smithy-rs/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/ClientReservedWords.kt
Line 23 in a87ffdf
however, the generated setter method on the builder does not get renamed, and so duplicate
set_metamethods are added to theimplblock.(reference:
smithy-rs/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/smithy/generators/BuilderGenerator.kt
Line 138 in a87ffdf
This leads to an invalid crate which will fail to compile with the following error: