-
Notifications
You must be signed in to change notification settings - Fork 768
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
Clippy borrow_deref_ref
for &PyAny
arguments
#2555
Labels
Comments
stuhood
added a commit
to stuhood/pants
that referenced
this issue
Aug 16, 2022
[ci skip-build-wheels]
Ungh, yes, sorry about this. It's actually already fixed on |
Got it: thanks a lot! The workaround (skipping this clippy lint) is not onerous, so don't rush on our account. |
22 tasks
Merged
thomaskrause
added a commit
to korpling/annatto
that referenced
this issue
Jan 20, 2023
vlaci
added a commit
to onekey-sec/unblob
that referenced
this issue
Apr 25, 2023
It tripped[^1] on clippy lints on Rustc 1.63: error: deref on an immutable reference --> rust/src/lib.rs:7:30 | 7 | pub fn shannon_entropy(data: &[u8]) -> PyResult<f64> { | ^ help: if you would like to reborrow, try removing `&*`: `&` | = note: `-D clippy::borrow-deref-ref` implied by `-D warnings` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref error: could not compile `unblob-rust` due to previous error [^1]: PyO3/pyo3#2555
vlaci
added a commit
to onekey-sec/unblob
that referenced
this issue
Apr 25, 2023
It tripped[^1] on clippy lints on Rustc 1.63: error: deref on an immutable reference --> rust/src/lib.rs:7:30 | 7 | pub fn shannon_entropy(data: &[u8]) -> PyResult<f64> { | ^ help: if you would like to reborrow, try removing `&*`: `&` | = note: `-D clippy::borrow-deref-ref` implied by `-D warnings` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref error: could not compile `unblob-rust` due to previous error [^1]: PyO3/pyo3#2555
vlaci
added a commit
to onekey-sec/unblob
that referenced
this issue
Apr 25, 2023
It tripped[^1] on clippy lints on Rustc 1.63: error: deref on an immutable reference --> rust/src/lib.rs:7:30 | 7 | pub fn shannon_entropy(data: &[u8]) -> PyResult<f64> { | ^ help: if you would like to reborrow, try removing `&*`: `&` | = note: `-D clippy::borrow-deref-ref` implied by `-D warnings` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref error: could not compile `unblob-rust` due to previous error [^1]: PyO3/pyo3#2555
vlaci
added a commit
to onekey-sec/unblob
that referenced
this issue
Apr 25, 2023
It tripped[^1] on clippy lints on Rustc 1.63: error: deref on an immutable reference --> rust/src/lib.rs:7:30 | 7 | pub fn shannon_entropy(data: &[u8]) -> PyResult<f64> { | ^ help: if you would like to reborrow, try removing `&*`: `&` | = note: `-D clippy::borrow-deref-ref` implied by `-D warnings` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref error: could not compile `unblob-rust` due to previous error [^1]: PyO3/pyo3#2555
vlaci
added a commit
to onekey-sec/unblob
that referenced
this issue
Apr 25, 2023
It tripped[^1] on clippy lints on Rustc 1.63: error: deref on an immutable reference --> rust/src/lib.rs:7:30 | 7 | pub fn shannon_entropy(data: &[u8]) -> PyResult<f64> { | ^ help: if you would like to reborrow, try removing `&*`: `&` | = note: `-D clippy::borrow-deref-ref` implied by `-D warnings` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref error: could not compile `unblob-rust` due to previous error [^1]: PyO3/pyo3#2555
vlaci
added a commit
to onekey-sec/unblob
that referenced
this issue
Apr 25, 2023
It tripped[^1] on clippy lints on Rustc 1.63: error: deref on an immutable reference --> rust/src/lib.rs:7:30 | 7 | pub fn shannon_entropy(data: &[u8]) -> PyResult<f64> { | ^ help: if you would like to reborrow, try removing `&*`: `&` | = note: `-D clippy::borrow-deref-ref` implied by `-D warnings` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref error: could not compile `unblob-rust` due to previous error [^1]: PyO3/pyo3#2555
vlaci
added a commit
to onekey-sec/unblob
that referenced
this issue
Apr 25, 2023
It tripped[^1] on clippy lints on Rustc 1.63: error: deref on an immutable reference --> rust/src/lib.rs:7:30 | 7 | pub fn shannon_entropy(data: &[u8]) -> PyResult<f64> { | ^ help: if you would like to reborrow, try removing `&*`: `&` | = note: `-D clippy::borrow-deref-ref` implied by `-D warnings` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref error: could not compile `unblob-rust` due to previous error [^1]: PyO3/pyo3#2555
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug Description
For code like this:
https://github.com/pantsbuild/pants/blob/c69a70c3837e5fdecdae5d3a0475a5e6fdfcf20f/src/rust/engine/src/externs/mod.rs#L298
...
clippy
under Rust1.63.0
renders an error like the following:Steps to Reproduce
./cargo clippy
(note the./
, which refers to a wrapper script to set up env vars)Your operating system and version
macOS 11.6.8
Your Python version (
python --version
)Python 3.7
Your Rust version (
rustc --version
)1.63.0
Your PyO3 version
0.16.5
How did you install python? Did you use a virtualenv?
pyenv
Additional Info
No response
The text was updated successfully, but these errors were encountered: