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

Remove _non_exhaustive fields to use #[non_exhaustive] macro #48

Merged
merged 2 commits into from Jan 24, 2021

Conversation

a1phyr
Copy link
Contributor

@a1phyr a1phyr commented Jan 13, 2020

Remove _non_exhaustive fields and replace them with the new #[non_exhaustive] macro

Pros

  • Disallow users to use this field anyway, which limit future breaking changes
  • Cleaner

Cons

  • Rust version support is reduced to 1.40+ (I didn't see any notice about that so it may be fine)
  • Breaking change
  • Disallow let handle = Handle { /* fields */ ..Handle::empty() }; syntax

Maybe provide a Handle::new(...) function for each type ?

@Lokathor
Copy link
Contributor

I like the idea of this, particularly because by now we're about on to 1.50, but I'll need to sit and think about it to be sure.

@Lokathor
Copy link
Contributor

Alright, I'm interested in having this in for sure.

@a1phyr there are some merge conflicts it seems. Can you update your PR to fix those? Or if you're not interested any more I can sort it out later.

@a1phyr
Copy link
Contributor Author

a1phyr commented Jan 24, 2021

Rebased, added Redox, and fixed doc-tests

@Lokathor Lokathor merged commit 73d4df9 into rust-windowing:master Jan 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants