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

Disambiguate Error type in TryFrom #29

Merged
merged 2 commits into from
Mar 12, 2024
Merged

Disambiguate Error type in TryFrom #29

merged 2 commits into from
Mar 12, 2024

Conversation

cmrschwarz
Copy link
Contributor

When trying to use subenum on an enum containing a variant named Error,
I got a compiler error, helpfully pointing me to this issue: rust-lang/rust#57644

This is due to the TryFrom implementation generated by subenum, where it is now ambiguous whether
Self::Error refers to the associated type TryFrom::Error or to the enum variant Error.

This PR fixes this by disambiguating in the return type of try_from.

@cmrschwarz
Copy link
Contributor Author

The CI errors on nightly seem unrelated to me, but let me know if there's anything I can do about that.

@paholg
Copy link
Owner

paholg commented Mar 12, 2024

Thanks for this!

I agree that the CI failures are unrelated. I'll go ahead and merge this, then fix the CI failures and make a release.

@paholg paholg merged commit bd8c572 into paholg:main Mar 12, 2024
3 of 6 checks passed
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