You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently updated my PAC for the VA108xx family and I receive following clippy warnings with the generated code:
va108xx-rs/va108xx on
main [!] is 📦 v0.3.0 via 🦀 v1.78.0
❯ cargo clippy
warning: this operation has no effect
--> va108xx/src/porta.rs:36:66
|
36 | unsafe{&*(selfas*constSelf).cast::<u8>().add(0).add(1* n).cast()}
| ^^^^^ help: consider reducing it to: `n`
|
= help:for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op
= note: `#[warn(clippy::identity_op)]` on by default
warning: this operation has no effect
--> va108xx/src/porta.rs:43:84
|
43 | ...cast::<u8>().add(0).add(1* n).cast()})
| ^^^^^ help: consider reducing it to: `n`
|
= help:for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op
warning: this operation has no effect
--> va108xx/src/porta.rs:55:66
|
55 | unsafe{&*(selfas*constSelf).cast::<u8>().add(4).add(1* n).cast()}
| ^^^^^ help: consider reducing it to: `n`
|
= help:for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op
Manually inserting #![allow(clippy::identity_op)] can be used to fix the issue, but this is probably something that can be fixed at the code-generation stage?
The text was updated successfully, but these errors were encountered:
robamu
changed the title
Clippy identity_op warning when using v0.33.3
Clippy identity_op warning in v0.33.3
Jun 25, 2024
Hi,
I recently updated my PAC for the VA108xx family and I receive following clippy warnings with the generated code:
Manually inserting
#![allow(clippy::identity_op)]
can be used to fix the issue, but this is probably something that can be fixed at the code-generation stage?The text was updated successfully, but these errors were encountered: