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

Adds "unstable-exhaustive-types" as new feature. #3056

Open
wants to merge 1 commit into
base: current
Choose a base branch
from

Conversation

TheCataliasTNT2k
Copy link

This feature deactivates all "#[non_exhaustive]" added into the code. This can be used by developers to ensure, that they match all enum variants or struct fields during pattern matching.

This should not break any existing code.

@github-actions github-actions bot added voice Related to the `voice` module and `serenity_voice_model` crate. model Related to the `model` module. builder Related to the `builder` module. cache Related to the `cache`-feature. http Related to the `http` module. utils Related to the `utils` module. gateway Related to the `gateway` module. labels Nov 24, 2024
@TheCataliasTNT2k TheCataliasTNT2k force-pushed the unstable_exhaustive branch 2 times, most recently from 547837f to c9293b3 Compare November 24, 2024 18:16
@GnomedDev
Copy link
Member

Why is this pointed at next? You yourself say it isn't a breaking change.

@TheCataliasTNT2k
Copy link
Author

This is pointed as next because

  • I use next instead of current
  • it saves you from doing it again for next, which would have to be done at some point.

Copy link
Member

@GnomedDev GnomedDev left a comment

Choose a reason for hiding this comment

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

Okay, so there is no technical reason it cannot be on current. Please rebase the PR on current.

It does not save anyone work to point a PR at the wrong branch, as if it is pointed at next but could be on current someone is going to backport it for current and lead to rebase annoyances.

@TheCataliasTNT2k
Copy link
Author

I could also create another PR for current if you want, so you have both.
But I need this feature for next.
Is there any way to get it for next?

@GnomedDev
Copy link
Member

Do not create two PRs, simply rebase this one on current. When a maintainer (probably me) feels like it (usually meaning not many PRs to next), next will be rebased on current.

@TheCataliasTNT2k
Copy link
Author

Ok, that makes sense.
However, I an not going to make a rebase, I have like 30 files conflicting.
I will just recreate the commit really quick on current, that is simpler :D

This feature deactivates all "#[non_exhaustive]" added into the code. This can be used by developers to ensure, that they match all enum variants or struct fields during pattern matching.
@TheCataliasTNT2k TheCataliasTNT2k changed the base branch from next to current November 25, 2024 11:30
@github-actions github-actions bot added framework Related to the `framework` and `framework::standard` modules and/or the `command_attr` crate client Related to the `client` module. labels Nov 25, 2024
@TheCataliasTNT2k
Copy link
Author

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builder Related to the `builder` module. cache Related to the `cache`-feature. client Related to the `client` module. framework Related to the `framework` and `framework::standard` modules and/or the `command_attr` crate gateway Related to the `gateway` module. http Related to the `http` module. model Related to the `model` module. utils Related to the `utils` module. voice Related to the `voice` module and `serenity_voice_model` crate.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants