-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 an "I just want to use ?
" type for use as a main
return type
#2367
Comments
Does |
@JustAPerson It's currently incompatible with |
Wouldn't |
@clarcharr That also doesn't work today, for the same reason as |
Something like |
@sgrif Personally I'd like to reserve |
I put some thoughts about how changing the desugaring of |
Inspired by rust-lang/rust#49162 (comment)
With
?
-in-main
about to stabilize, it would be nice to have an "it just works" return type formain
so that one can start a bin withfn main() -> InsertSomethingEasyHere {
until you care about doing something else.Edit: Would also be nice for tests, since they never care about the error type, just whether there was one. (cc rust-lang/rust#48854)
Tagging lang in case this needs tweaks to
?
to work well with heterogeneous error types.Tagging libs in case this should be an alias for something like
Result<(), Box<Error>>
or involvefailure
in some way.The text was updated successfully, but these errors were encountered: