Skip to content
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

new lint: enum_tuple_variant_field_marked_deprecated #1202

Conversation

Frank-III
Copy link
Contributor

final part of: #57

"true": true,
},
error_message: "A field in an enum's tuple variant is now #[deprecated]. Downstream crates will get a compiler warning when accessing this field.",
per_result_error_template: Some("field at position {{field_position}} in enum variant {{enum_name}}::{{variant_name}} in {{span_filename}}:{{span_begin_line}}"),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason not to use the field name and Rust syntax for it? Like MyEnum::Variant.0 for example?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good call! I think I thought about this but yeah you are right this is more consistent with what we did for all other lints.

@obi1kenobi obi1kenobi enabled auto-merge (squash) March 21, 2025 04:43
@obi1kenobi obi1kenobi linked an issue Mar 21, 2025 that may be closed by this pull request
16 tasks
@obi1kenobi obi1kenobi merged commit 09ecf4f into obi1kenobi:main Mar 21, 2025
31 of 32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Added deprecated attribute API lint, minor incompatibility level
2 participants