-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for Rust compiler warning about derive helpers #2581
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
david-perez
approved these changes
Apr 17, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
...gen-core/src/test/kotlin/software/amazon/smithy/rust/codegen/core/rustlang/RustWriterTest.kt
Outdated
Show resolved
Hide resolved
codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/rustlang/RustType.kt
Outdated
Show resolved
Hide resolved
codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/rustlang/RustType.kt
Outdated
Show resolved
Hide resolved
codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/rustlang/RustType.kt
Outdated
Show resolved
Hide resolved
Co-authored-by: david-perez <[email protected]>
Suggestions applied, thanks @david-perez |
ysaito1001
approved these changes
Apr 19, 2023
unexge
pushed a commit
that referenced
this pull request
Apr 24, 2023
## Motivation and Context Follow-up to #2434 ## Description This provides a way to fix a compiler warning. Attributes created using RustMetadata.additionalAttributes may trigger compiler warnings (rust-lang/rust#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 <rust-lang/rust#79202> ``` ## Testing Added a unit test to validate the sort order is applied correctly to Attributes with isDeriveHelper = true. --------- Co-authored-by: david-perez <[email protected]>
rcoh
pushed a commit
that referenced
this pull request
Apr 24, 2023
## Motivation and Context Follow-up to #2434 ## Description This provides a way to fix a compiler warning. Attributes created using RustMetadata.additionalAttributes may trigger compiler warnings (rust-lang/rust#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 <rust-lang/rust#79202> ``` ## Testing Added a unit test to validate the sort order is applied correctly to Attributes with isDeriveHelper = true. --------- Co-authored-by: david-perez <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation and Context
Follow-up to #2434
Description
This provides a way to fix a compiler warning. Attributes created using RustMetadata.additionalAttributes may trigger compiler warnings (rust-lang/rust#79202) such as
Testing
Added a unit test to validate the sort order is applied correctly to Attributes with isDeriveHelper = true.