Skip to content
Unverified Commit d626fd28 authored by Nate McMaster (AWS)'s avatar Nate McMaster (AWS) Committed by GitHub
Browse files

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: default avatardavid-perez <d@vidp.dev>
parent 8498ce84
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment