-
Notifications
You must be signed in to change notification settings - Fork 234
Implement Error traits for Infallible #328
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
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @therealprof (or someone else) soon. Please see the contribution instructions for more information. |
While at it, maybe we can also implement them for |
Is |
At last, an implementation for |
No, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seconding that we don't need void::Void
here as it's been functionally replaced by Infallible
.
lgtm, thanks!
bors r+
The Also, when the signature of a called function changes from |
@Rahix, the equivalent to |
you run into some weird issues when crates use both |
Neat, didn't know of this yet. Yeah, very unfortunate.
Was a bit surprised, but yeah, this actually compiles as well: fn unreachable(t: core::convert::Infallible) -> ! {
match t { }
} The thing I am worried about is not finding a solution for myself, but how do we teach this to others. If there isn't an easily usable method, everyone will resort to just using I'm all for switching to |
I agree that there is room for improvement. However I don't think this PR is the right place to discuss it. |
Totally agree. I opened #329 for it. |
No description provided.