-
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
catch assert!
assert_eq!
assert_ne!
and variants in ResultFN
#6082
Comments
aseert!
assert_eq!
assert_ne!
and variants in ResultFNassert!
assert_eq!
assert_ne!
and variants in ResultFN
@nahuakang This seems like a good first issue to me. A similar lint is already implemented and code can probably shared with that lint. So what you would have to do is to look at the |
Thanks Phil. I'll pick up on your hints! |
@nahuakang are you still working on this issue? |
@dp304 Yes I intend to. Edit: I'm gonna get started on it soon :) |
@nahuakang I haven't noticed your comment edit, so I've made a PR. Sorry about that. |
Cool, then I'll read your PR and learn from you! |
Add lint for assertions in functions returning Result changelog: none fixes #6082
Why was I would like to make a PR that removes |
@daxpedda You're right, this lint shouldn't trigger on debug macros. It would be great if you could open a PR fixing that. Please also note this in the lint documentation though. |
Will do! |
…p1995 Remove `debug_assert` from `panic_in_result_fn` I couldn't find any documentation on `debug_assert` that should be remove. In my humble opinion, I would also like to argue that `todo` and `unreachable` shouldn't trigger this lint? Related: #6082 r? `@flip1995` changelog: Change `panic_in_result_fn` to ignore `debug_assert` and co macros
…p1995 Remove `debug_assert` from `panic_in_result_fn` I couldn't find any documentation on `debug_assert` that should be remove. In my humble opinion, I would also like to argue that `todo` and `unreachable` shouldn't trigger this lint? Related: #6082 r? `@flip1995` changelog: Change `panic_in_result_fn` to ignore `debug_assert` and co macros
…p1995 Remove `debug_assert` from `panic_in_result_fn` I couldn't find any documentation on `debug_assert` that should be remove. In my humble opinion, I would also like to argue that `todo` and `unreachable` shouldn't trigger this lint? Related: #6082 r? `@flip1995` changelog: Change `panic_in_result_fn` to ignore `debug_assert` and co macros
What it does
catch
assert!
assert_eq!
assert_ne!
and variants in ResultFNin a function that returns result , it is very likely the use of these macros are plain wrong.
Categories (optional)
similar to https://rust-lang.github.io/rust-clippy/master/#panic_in_result_fn
The text was updated successfully, but these errors were encountered: