-
- Downloads
Fix for Rust compiler warning about derive helpers (#2581)
## Motivation and Context Follow-up to https://github.com/awslabs/smithy-rs/pull/2434 ## Description This provides a way to fix a compiler warning. Attributes created using RustMetadata.additionalAttributes may trigger compiler warnings (https://github.com/rust-lang/rust/issues/79202) such as ``` warning: derive helper attribute is used before it is introduced --> src/model.rs:7674:3 | 7674 | #[serde(tag = "_type", content = "_content")] | ^^^^^ 7675 | #[derive( 7676 | serde::Deserialize, | ------------------ the attribute is introduced here | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #79202 <https://github.com/rust-lang/rust/issues/79202 > ``` ## Testing Added a unit test to validate the sort order is applied correctly to Attributes with isDeriveHelper = true. --------- Co-authored-by:david-perez <d@vidp.dev>
Showing
- codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/rustlang/RustType.kt 14 additions, 3 deletions...ware/amazon/smithy/rust/codegen/core/rustlang/RustType.kt
- codegen-core/src/test/kotlin/software/amazon/smithy/rust/codegen/core/rustlang/RustWriterTest.kt 13 additions, 0 deletions...mazon/smithy/rust/codegen/core/rustlang/RustWriterTest.kt
Loading
Please register or sign in to comment