-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Warn when casting an enum that is fieldless but not C-like #92700
Conversation
/// | ||
/// [future-incompatible]: ../index.md#future-incompatible-lints | ||
/// [issue #88621]: https://github.com/rust-lang/rust/issues/88621 | ||
pub NOT_CENUM_CAST, |
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.
nit: CENUM
looks a little off to me. Maybe C_ENUM
would be better?
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.
There is an existing lint "CENUM_IMPL_DROP_CAST" and I just followed that.
☔ The latest upstream changes (presumably #93548) made this pull request unmergeable. Please resolve the merge conflicts. |
I'm tentatively cc'ing cc @rust-lang/lang |
This apparently is waiting on T-lang input @rustbot label: I-lang-nominated |
Discussed in the lang team meeting today. Based on the age of this PR, and the fact that we've had several design meetings on this but never come to any clear conclusions, we're going to close this PR for now. We're still blocked on a proposal for a consistent set of rules, essentially. We agree it would be nice to see this resolved! (cc @jswrenn) |
Implementation of the second option as mentioned in #60553 (comment).
Marked as draft as this needs a lang team decision.
r? @ghost
@rustbot label: +T-lang