-
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
Redundant closure lint recommends incorrect code #10378
Comments
@rustbot label |
Minimal example added. This is a weird error that is preventing Python bindings of Apache Arrow Datafusion from using clippy in our CI. |
Corresponding issue on PyO3: PyO3/pyo3#2988 |
Closed as this is not a Clippy issue. It is a PyO3 one. |
Despite having fixed this in PyO3, I would be interested to hear if there are techniques to hint clippy that the PyO3 code is generated and users can't easily correct it. |
Summary
This is probably a variant of #3071 or #7435. This error is probably dependent on PyO3 which is why I have filed an issue there as well as PyO3/pyo3#2988.
The reason why it is necessary to file an issue here is that the suggestion doesn't actually fix the issue. In fact the same issue exists after refactoring the code according to the suggestion. The next suggestion is for us to directly use Vec::new as a function which causes an error.
Lint Name
redundant-closure
Reproducer
I tried this code:
I saw this happen:
I expected to see this happen:
Version
Additional Labels
I-suggestion-causes-error
The text was updated successfully, but these errors were encountered: