-
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
False Positive of unnecessary_fallible_conversions
for pyo3
#12039
Comments
I'm also seeing this. I guess this happens within the Also, notably, you can't just stick the |
That's odd, all method lints already have a check if they're from a macro: rust-clippy/clippy_lints/src/methods/mod.rs Lines 4001 to 4005 in 174a0d7
I guess |
@davidhewitt is there something on the PyO3 side that could be improved here? |
We've already "fixed" this (with an |
@davidhewitt awesome as always, thanks! |
Patch release is out, @Xuanwo please let me know if there's still an issue after upgrading. |
Great! The patch resolved my issue. |
Summary
rust-clippy with 1.75 could emit false positive of
unnecessary_fallible_conversions
for pyo3:It's bit confused to raising
unnecessary_fallible_conversions
on API like this:Py
is a transparent struct expose by pyo3: https://docs.rs/pyo3/latest/pyo3/struct.Py.htmlLint Name
unnecessary_fallible_conversions
Reproducer
I tried this code:
I saw this happen:
I expected to see this happen: no warning
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: