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

Warn when casting an enum that is fieldless but not C-like #92700

Closed
wants to merge 1 commit into from

Conversation

nbdd0121
Copy link
Contributor

@nbdd0121 nbdd0121 commented Jan 9, 2022

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

@rustbot rustbot added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-lang Relevant to the language team, which will review and decide on the PR/issue. labels Jan 9, 2022
///
/// [future-incompatible]: ../index.md#future-incompatible-lints
/// [issue #88621]: https://github.com/rust-lang/rust/issues/88621
pub NOT_CENUM_CAST,
Copy link
Member

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?

Copy link
Contributor Author

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.

@camelid camelid added the S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). label Jan 29, 2022
@bors
Copy link
Contributor

bors commented Feb 1, 2022

☔ The latest upstream changes (presumably #93548) made this pull request unmergeable. Please resolve the merge conflicts.

@apiraino
Copy link
Contributor

apiraino commented Jul 6, 2022

I'm tentatively cc'ing T-lang to understand if there is an update here. Thanks!

cc @rust-lang/lang

@pnkfelix
Copy link
Member

pnkfelix commented Sep 8, 2022

This apparently is waiting on T-lang input

@rustbot label: I-lang-nominated

@rustbot rustbot added the I-lang-nominated Nominated for discussion during a lang team meeting. label Sep 8, 2022
@nikomatsakis
Copy link
Contributor

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-lang-nominated Nominated for discussion during a lang team meeting. S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-lang Relevant to the language team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants