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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
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 T-lang 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

@camelid camelid Jan 9, 2022

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

@nbdd0121 nbdd0121 Jan 9, 2022

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 label Jan 29, 2022
@bors
Copy link
Contributor

@bors bors commented Feb 1, 2022

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

@apiraino
Copy link

@apiraino 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-team T-compiler T-lang
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants