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

Make options structs exhaustive #516

Merged
merged 1 commit into from
Jan 4, 2025

Conversation

nicoburns
Copy link
Contributor

This is annoying limitation of current rustc: it is impossible to construct #[non_exhaustive] structs using struct-literal syntax, even when using ..Default::default(). This means that with bon disabled (possible since #515) it is impossible to construct the options structs.

This PR removes the #[non_exhaustive] attributes.

Copy link
Owner

@kivikakk kivikakk left a comment

Choose a reason for hiding this comment

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

Thanks so much! Happy to make these exhaustive now that we do have builders.

@kivikakk kivikakk merged commit 21e1741 into kivikakk:main Jan 4, 2025
19 of 20 checks passed
@nicoburns
Copy link
Contributor Author

@kivikakk Amazing! Any chance a new release with these changes? ;)

(caseless ended up publishing a new version as a patch release, so there's no need to update that)

@kivikakk
Copy link
Owner

kivikakk commented Jan 4, 2025

Happy to. :) Will ping back here when done.

@kivikakk
Copy link
Owner

kivikakk commented Jan 4, 2025

Done! crates.io, GitHub release. Thanks again!

@nicoburns
Copy link
Contributor Author

Thanks!

@nicoburns nicoburns deleted the remove-non-exhaustive branch January 4, 2025 01:54
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.

2 participants