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

Simplify windows::core type traits #2343

Merged
merged 5 commits into from
Feb 22, 2023
Merged

Simplify windows::core type traits #2343

merged 5 commits into from
Feb 22, 2023

Conversation

kennykerr
Copy link
Collaborator

The type traits used internally by the windows crate for modeling various abstractions and reasoning about how certain types behave have long been somewhat cumbersome due to the inability to express mutually exclusive type traits in Rust. Well, I stumbled upon an approach that can do just that. We can now distinguish between reference and value types, and other potential categories, and provide unique behavior and associated types in a single place. This will take a few iterations to polish, but this is a good start and simplifies a lot of that plumbing considerably.

This work was motivated by my desire to work on #91 but that requires reasoning more clearly about types and so you will also see some much-needed improvements to the way the implement macro generated generic constraints.

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

Successfully merging this pull request may close these issues.

1 participant