-
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
needless_doctest_main vs. question mark operator #4906
Comments
Sorry, nevermind. This was only happening because I was still using the old |
Yeah, we should detect this. You can just do the following:
|
Oh, suggesting that would be nice. Reopening. |
I am a little bit confused, what does this issue suggest we do, to detect and lint for appearance of |
@llogiq, do you suggest detecting |
We could certainly do that. I have a branch open that should be easier to extend in that regard, but it failed CI for some reason. |
Oh, thanks for replying. |
@llogiq are you working on this? |
I am currently using main with return type
Result<(), Box<Error>>
in order to be able to use the question mark operator in examples.This is recommended in the API guidelines: https://rust-lang.github.io/api-guidelines/documentation.html#examples-use--not-try-not-unwrap-c-question-mark
Clippy should not suggest removing main() in this case.The text was updated successfully, but these errors were encountered: