Skip to content

Missing documentation around casting foreign non-exhaustive enums #1250

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
lambinoo opened this issue Aug 14, 2022 · 0 comments · Fixed by #1249
Closed

Missing documentation around casting foreign non-exhaustive enums #1250

lambinoo opened this issue Aug 14, 2022 · 0 comments · Fixed by #1249

Comments

@lambinoo
Copy link
Contributor

lambinoo commented Aug 14, 2022

After rust-lang/rust#91161 by rust-lang/rust#92744 got merged, the new behavior for non-exhaustive enums on cast should be documented.

use othercrate::NonExhaustiveEnum;

let _ = NonExhaustiveEnum::default() as u8; // This is a compile error now

Non exhaustive type documention is not reflecting that right now.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant